You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I followed the instructions to install the script. I am able to execute the script with sudo as my regular user but it won't work when logged in as snapbtr. The output is
[snapbtr@rob-thinkpad ~]$ sudo /bin/snapbtrex.py --path /mnt/.snapshots/ --snap /home
Traceback (most recent call last):
File "/usr/bin/snapbtrex.py", line 922, in <module>
sys.exit(main(sys.argv))
File "/usr/bin/snapbtrex.py", line 892, in main
operations.snap(path=pa.snap)
File "/usr/bin/snapbtrex.py", line 313, in snap
self.check_call(args)
File "/usr/bin/snapbtrex.py", line 268, in check_call
shell=shell)
File "/usr/lib/python2.7/subprocess.py", line 394, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child
raise child_exception
OSError: [Errno 13] Permission denied
I tried creating a snapshot using "btrfs subvolume create", which works fine, however "btrfs subvolume delete" doesn't, it also throws "Operation not permitted". Maybe this has something to do with it?
The text was updated successfully, but these errors were encountered:
Hi this sounds like the sudoers file is not correct did you check if the line: snapbtr ALL=(root:nobody) NOPASSWD:NOEXEC: /bin/btrfs subvolume*
does exist?
Please check where the btrfs tools are via which btrfs it may point to /sbin/btrfsthen you'll have to alter the sudoers file accordingly.
The script uses the snapshot subcommand sudo btrfs subvolume snapshot -r /home /mnt/.snapshot/TIMESTAMP
I played around with it some more. I then realized, that running snapbtrex.py using sudo was the issue. Running it directly works fine. You might want to edit that in your readme. Thanks for your support!
I followed the instructions to install the script. I am able to execute the script with sudo as my regular user but it won't work when logged in as snapbtr. The output is
I tried creating a snapshot using "btrfs subvolume create", which works fine, however "btrfs subvolume delete" doesn't, it also throws "Operation not permitted". Maybe this has something to do with it?
The text was updated successfully, but these errors were encountered: