You are not logged in.
I'd like to mount an ntfs partition w/ ntfs-3g but only allow access on the Linux side to a single user. I don't want it mounted in my /etc/fstab however. I mount it on the fly now from the shell
sudo mount -t ntfs-3g /dev/sdb1 /media/ntfs_data
I know about the uid=xxxx flag that I can include in an /etc/fstab entry, but I can't seem to get the syntax correct for a shell-based mount command. Anyone?
Last edited by graysky (2009-09-02 07:13:43)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
the -o flag is what you use to put in any of those options (ro, uid=, gid=, etc...)
so just add on the -o uid=xxxx
edit: oops you were looking to change uid, not gid
Last edited by Bregol (2009-09-01 22:57:35)
Nai haryuvalyë melwa rë
Offline
Don't mess things up with UUIDS.
Always use clear device names.
/me wants you to detele this account... please delete it.
Offline
the -o flag is what you use to put in any of those options (ro, uid=, gid=, etc...)
so just add on the -o uid=xxxx
edit: oops you were looking to change uid, not gid
I just want to limit the mount to ONLY a single user so all other users cannot read/write/execute it at all. If the user's UID is 3010 would the syntax then be:
sudo mount -t ntfs-3g -o uid=3010 /dev/sdb1 /media/ntfs_data
EDIT: that didn't work. It just assigns my user as the owner, but all others may freely rwx the partition.
Last edited by graysky (2009-09-02 00:26:12)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Maybe try to add the umask option:
-o uid=xxx,umask=022
This should set permissions to 755 on the mount so the owner can do anything, and everyone else can only read.
Edit: to not allow anyone else to read at all, umask 077 should do it.
Last edited by neddie_seagoon (2009-09-02 03:06:07)
Offline
apollokk - you're entitiled to your opinion regarding UUIDs, but it has nothing to do with this thread. The OP is asking about UIDs.
Please read before posting.
Offline
@neddie_seagoon -
The following command you suggested worked!
sudo mount -t ntfs-3g -o uid=3010,umask=077 /dev/sdb1 /media/ntfs_data
If I ls -l the mount point, I do indeed get:
drwx------ 1 username root 8.0K 2009-08-20 14:52 ntfs_data
Thank you!
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline