202 reputation
18
bio website
location
age
visits member for 10 months
seen Mar 20 at 19:53

Mar
14
accepted Rsync won't Give Up Writing to an Unmounted Remote Drive
Mar
11
comment Rsync won't Give Up Writing to an Unmounted Remote Drive
This is good little trick. So, if the drive isn't mounted, rsync will error out for the whole transfer at once instead of trying ever single file?
Mar
11
revised Rsync won't Give Up Writing to an Unmounted Remote Drive
added 125 characters in body
Mar
11
comment Rsync won't Give Up Writing to an Unmounted Remote Drive
The script was attempting to mount beforehand, but I didn't have the OR-logic you're suggesting. This is a good suggestion. Thanks
Mar
11
asked Rsync won't Give Up Writing to an Unmounted Remote Drive
Mar
6
comment Allow NonRoot User to Mount a Particular NTFS External Hard Drive
That did indeed work, when I was typing "mount -a" for this non-root user, I should have been typing "sudo mount -a" Thanks again for your help.
Mar
6
accepted Allow NonRoot User to Mount a Particular NTFS External Hard Drive
Mar
6
comment Allow NonRoot User to Mount a Particular NTFS External Hard Drive
I added this line to the /etc/sudoers file: actualusername ALL=NOPASSWD: /bin/mount, /sbin/mount.ntfs-3g, /bin/umount but, even after a reboot, the user cannot mount -a.
Mar
6
comment Allow NonRoot User to Mount a Particular NTFS External Hard Drive
@MarkPlotnick Thanks for directing to the logs. Here's an example of the type of entries I see regarding this external hard drive: Mar 6 09:33:01 server collectd[3905]: uc_update: Value too old: name = server.domain.lan/df/df-mnt-USBexternal; value time = 1394119981; last cache update = 1394119981;
Mar
6
comment Allow NonRoot User to Mount a Particular NTFS External Hard Drive
Thanks for specific details on achieving this. I suspect that limiting this user's mount-ability to one specific mount-point is too difficult to achieve, but would like to know your thoughts. You see, to me it seems like what you're suggesting would also give the user the ability (if malicious) to mount and umount things outside the scope of this specific external drive. What are your thoughts?
Mar
5
comment Allow NonRoot User to Mount a Particular NTFS External Hard Drive
You are right that I've never looked deeply at sudoers. I'm looking now though. I hope I can achieve this without the user having to type their password, because the ultimate goal is performing these backups automatically using this user's account.
Mar
5
comment Allow NonRoot User to Mount a Particular NTFS External Hard Drive
Perhaps it shouldn't, but I don't want to give every user the ability to mount or umount this drive. I'm trying to limit this ability to one particular user and root.
Mar
5
revised Allow NonRoot User to Mount a Particular NTFS External Hard Drive
edited title
Mar
5
comment Allow NonRoot User to Mount a Particular NTFS External Hard Drive
If you'll look at the fstab permissions, at the top of my question, you'll see that I've only permitted access for one particular user. If I log in as another user, I cannot access the file system. Only root and that particular user can access it. That's intended.
Mar
5
comment Allow NonRoot User to Mount a Particular NTFS External Hard Drive
@Ramesh : Given that this is an ntfs drive, do you think your setfacl suggestion would actually work in this case?
Mar
5
revised Allow NonRoot User to Mount a Particular NTFS External Hard Drive
added 294 characters in body
Mar
5
revised Allow NonRoot User to Mount a Particular NTFS External Hard Drive
added 117 characters in body
Mar
5
awarded  Commentator
Mar
5
comment Allow NonRoot User to Mount a Particular NTFS External Hard Drive
/dev/disk/by-uuid/CEE0476DE0388DA9/ /mnt/USBexternal ntfs-3g defaults,auto,uid=51343,gid=50432,umask=077 0 0
Mar
5
comment Allow NonRoot User to Mount a Particular NTFS External Hard Drive
The problem with sudo for fstab suggestion, is that I don't want other users to be able to see this external drive.