2

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

2 Answers2

3

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.

Ignacio Vazquez-Abrams
  • 45,019
  • 5
  • 78
  • 84
  • 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 –  May 13 '10 at 01:30
  • 1
    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 02:13
  • then , can i change permission after mounting. These has to have some solution. –  May 13 '10 at 02:30
1

/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

Tom Bell
  • 31
  • 2