I have a 4TB external hard drive connected to an Linux server.
The fstab permissions on this drive are set so that only one particular non-root user has access to it:
/dev/disk/by-uuid/CEE0476DE0388DA9/ /mnt/USBexternal ntfs-3g defaults,auto,uid=51343,gid=50432,umask=077 0 0 From a remote location, this user has been successful at doing rsync backups to this external hard drive.
However, the external drive doesn't stay mounted as reliably as an internal hard drive does. Every couple of days I'm having to login as root do this command:
mount -a I would like to give this user the ability to mount this drive, but when the non-root user does mount -a, it tells them they do not have permission to do this:
nonrootuser@server:~$ mount -a mount: only root can do that When the non-root user tries to mount this drive specifically, it tells them it is already mounted (even though it isn't):
nonrootuser@server:~$ mount /mnt/USBexternal/ mount: according to mtab, /dev/sdb1 is already mounted on /mnt/USBexternal As mentioned, the drive is not actually mounted, but (because of the output above) if the non-root user tries to unmount the drive, it says their request disagrees with fstab:
nonrootuser@server:~$ umount /mnt/USBexternal/ umount: /mnt/USBexternal/ mount disagrees with the fstab How can I permit this user the ability to mount this drive, without giving them any other administrative powers?
setfacl. You can give permissions to the user to only the level for which they need.collectdmight just mean that the filesystem wasn't mounted when it checked. See if there are log entries that have the stringkernelorntfs-3gorfusein them and look like errors. One possibility is that the drive is going offline, so there may be some chatter about usb disconnections.fsckon the ntfs filesystem (do this only when it's not mounted); hopefully someone else reading this can recommend something.