Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PermissionError #381

Open
thiagoc opened this issue May 13, 2016 · 3 comments
Open

PermissionError #381

thiagoc opened this issue May 13, 2016 · 3 comments

Comments

@thiagoc
Copy link

thiagoc commented May 13, 2016

Getting this error when I extract some directory, but the files seems to be extracted correctly. Should I worry or my backups are safe?

[thiagoc@ironhide ~]$ attic extract user@backup-host:attic_repo::20160512 c/test/blq
attic: c/test/blq/acordo thereza 01.rvf: [Errno 1] 4
attic: c/test/blq/acordo thereza 02.rvf: [Errno 1] 4
attic: c/test/blq/acordo thereza 03.rvf: [Errno 1] 4
attic: c/test/blq/acordo.rvf: [Errno 1] 4
attic: c/test/blq/aluguel.rvf: [Errno 1] 4
attic: c/test/blq/aviso.rvf: [Errno 1] 4
attic: c/test/blq/bancos.rvf: [Errno 1] 4
attic: c/test/blq/boletos clientes.rvf: [Errno 1] 4
attic: c/test/blq/chamada de capital salão de festas.dem: [Errno 1] 4
attic: c/test/blq/chamada de capital salão de festas.rvf: [Errno 1] 4
attic: c/test/blq/controle extra.rvf: [Errno 1] 4
attic: c/test/blq/herondina.rvf: [Errno 1] 4
attic: c/test/blq/homologação.rvf: [Errno 1] 4
attic: c/test/blq/honorários.rvf: [Errno 1] 4
attic: c/test/blq/logo.rvf: [Errno 1] 4
attic: c/test/blq/marseille.rvf: [Errno 1] 4
attic: c/test/blq/msg marseille.rvf: [Errno 1] 4
attic: c/test/blq/mudança entrada.rvf: [Errno 1] 4
attic: c/test/blq/mudança.rvf: [Errno 1] 4
attic: c/test/blq/multa.dem: [Errno 1] 4
attic: c/test/blq/pitágoras.rvf: [Errno 1] 4
attic: c/test/blq/reparos.rvf: [Errno 1] 4
attic: c/test/blq/test.swf: [Errno 1] 4
attic: c/test/blq/taxa .rvf: [Errno 1] 4
attic: c/test/blq/taxa de cond.rvf: [Errno 1] 4
attic: c/test/blq/taxa de condominio.rvf: [Errno 1] 4
attic: c/test/blq/taxa de condomínio .rvf: [Errno 1] 4
attic: c/test/blq/taxa de condomínio.rvf: [Errno 1] 4
attic: c/test/blq/taxa de.rvf: [Errno 1] 4
attic: c/test/blq/taxa.rvf: [Errno 1] 4
attic: c/test/blq/taxas.rvf: [Errno 1] 4
attic: c/test/blq/teste.rvf: [Errno 1] 4
attic: c/test/blq/testte.rvf: [Errno 1] 4
attic: c/test/blq/torre de anis.rvf: [Errno 1] 4
attic: c/test/blq/verso.rvf: [Errno 1] 4
attic: c/test/blq/água construtora.rvf: [Errno 1] 4
Traceback (most recent call last):
  File "/home/thiagoc/.virtualenvs/attic/bin/attic", line 3, in <module>
    main()
  File "/home/thiagoc/.virtualenvs/attic/lib/python3.5/site-packages/attic/archiver.py", line 730, in main
    exit_code = archiver.run(sys.argv[1:])
  File "/home/thiagoc/.virtualenvs/attic/lib/python3.5/site-packages/attic/archiver.py", line 720, in run
    return args.func(args)
  File "/home/thiagoc/.virtualenvs/attic/lib/python3.5/site-packages/attic/archiver.py", line 226, in do_extract
    archive.extract_item(dirs.pop(-1))
  File "/home/thiagoc/.virtualenvs/attic/lib/python3.5/site-packages/attic/archive.py", line 263, in extract_item
    self.restore_attrs(path, item)
  File "/home/thiagoc/.virtualenvs/attic/lib/python3.5/site-packages/attic/archive.py", line 304, in restore_attrs
    xattr.setxattr(fd or path, k, v, follow_symlinks=False)
  File "/home/thiagoc/.virtualenvs/attic/lib/python3.5/site-packages/attic/xattr.py", line 101, in setxattr
    _check(func(path, name, value, len(value) if value else 0, 0), path)
  File "/home/thiagoc/.virtualenvs/attic/lib/python3.5/site-packages/attic/xattr.py", line 36, in _check
    raise OSError(get_errno(), path)
PermissionError: [Errno 1] b'/run/media/thiagoc/47f8e20c-484d-4379-93b6-2e02cbcbcfa5/Temp/innovare/c/test/blq'
@ThomasWaldmann
Copy link
Contributor

As the traceback happened in xattr code, I would suspect it is unable to set extended attributes.

I see you ran that from your user account, so it it maybe does not have enough permissions if in that archive is any file that is not owned by your user. Retry using the root account?

Another issue could be that the filesystem you are working on does not support extended attributes (xattrs), check your mount options and your filesystem's capabilities.

@thiagoc
Copy link
Author

thiagoc commented May 13, 2016 via email

@ThomasWaldmann
Copy link
Contributor

Yes, it could be prettier, definitively.

OTOH, a traceback, although somehow ugly, is nice to debug issues as one sees quite good at what place in the code something went wrong and what precisely it was.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants