Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am using this to mount drive at startup

/dev/sda5 /media/virtual ntfs defaults,umask=700,uid=1 0 0

This is working fine but i need things

1)By this method all the folders inside the virtual folder have same permissions but i want 700 for virtual directory and 777 for all other directories

2)I want that if i can add group as well in the mount command. Just like uid, if i couol add gid as well. Is it possible

share|improve this question

2 Answers 2

Uhh...

uid=value and gid=value

Set the owner and the group of files and directories. The values are numerical. The defaults are the uid and gid of the current process.

...

fmask=value

Set the bitmask of the file permissions that are not present. The value is given in octal. The default value is 0 which means full access to everybody.

dmask=value

Set the bitmask of the directory permissions that are not present. The value is given in octal. The default value is 0 which means full access to everybody.

share|improve this answer
    
Thanks , it get it working. But i still have one problem. IN my partition "virtual" , i have five folders , i only want to give the 777 access to one folder but to others i need 700 permission. How can i do permissions different for different folders. I don't want anyone to see other folders –  John May 13 '10 at 1:30
    
That can't be done. The granularity of permissions for non-POSIX-compliant filesystems is the entire volume. –  Ignacio Vazquez-Abrams May 13 '10 at 2:13
    
then , can i change permission after mounting. These has to have some solution. –  John May 13 '10 at 2:30

/dev/sda5 /media/virtual ntfs defaults,umask=700,uid=1,gid=1 0 0

Just adding gid= to the options should add the group of your choice .. though I'd ensure your using the right GID. Setting umask to 777 will effect all files and dirs mounted.

T

share|improve this answer

Your Answer

 
discard

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