Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

My user id is 1000 and second user id is 1001

and my fstab entry for the drives are

# /media/Data_Ext4 was on /dev/sda7 during installation
UUID=1c2862cf-5838-49a7-bcef-715319a7841e /media/Data_Ext4 ext4    defaults,nofail,uid=1000       0       0

# /media/NTFS was on /dev/sda3 during installation
UUID=4A94A52994A51889  /media/NTFS     ntfs    defaults,uid=1000                             0       0

but still uid=1001 can access these drives as mounted volumes....

share|improve this question
1  
... and what about the group? Have you tried adding gid=1000? –  mikewhatever Dec 20 '11 at 8:56
    
no i will try and let u know thanks.. –  joe1983 Dec 20 '11 at 9:25
    
ading gid=1000 lead to error during mounting –  joe1983 Dec 20 '11 at 10:48
    
Perhaps gid=119 would have been a better idea. 119 is the admin group –  mikewhatever Dec 20 '11 at 13:34

1 Answer 1

Make sure that the mount command does not have a Set UID permission set on it. A set UID permission allows a script to execute as the creator instead of the invoker. Lets say root owns/created the file, if you run it and it has that permission you're effectively root.

By changing this permission normal users can't use mount without sudo.

share|improve this answer
    
tried changing using chmod 0641 for /bin/mount ....no effect –  joe1983 Dec 20 '11 at 11:20
    
ls -la, see if the change took properly, mount shouldn't have any types of odd background or font color if it did. –  Brandon Weaver Dec 21 '11 at 7:23
    
ls -la /bin/mount -rw-r----x 1 root root 88716 2011-08-09 21:45 /bin/mount –  joe1983 Dec 22 '11 at 14:02
    
Notice that last X on there? chmod anything as a 1 and that sets executable. You want 4 or 0 for readonly or no access. Remember this goes back to binary: RWX 000 = none; 001 = execute only; 100 = dec 4, readonly; Just remember that. –  Brandon Weaver Dec 27 '11 at 11:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.