1

I am trying a lot still my problem is not solved.

I have a partion called Server and inside it i have 5 folders like

Folder 1
FOlder 2
Folder 3 

I am mounting the drive on startup by using following command as told to me by some senoir members and it works but with some problems

/dev/sdb1 /media/Server ntfs defaults,umask=006,fmask=000,dmask=007,uid=1000,gid=1001 0 0

The problem is with this command the permission are applied to all folders like Folder 1 , Folder 2 , FOlder3

But i want that only FOlder 3 should be publicly readable and writable while all other should be private and no one should have access to that.

How can i achieve that

  • 1
    NTFS is not a Unix filesystem, so it does not actually store permissions on the drive. I don't think there is a way to set per-directory permissions on a mounted NTFS drive in Linux. Can you use a filesystem meant for Unix/Linux instead of FAT or NTFS? – Trey Hunner May 13 '10 at 04:27
  • I am sharing that drive on the network. If i use Linux file system , can window/mac users can see/edit/delete files as before –  May 13 '10 at 04:30

3 Answers3

0

instead of setting permissions for the entire drive with umask=006,fmask=000,dmask=007,uid=1000,gid=1001 in your fstab, you can set individual permissions on per-directory basis.

chown -R 1000:1001 on Folder 1/Folder 2

chmod 750 on Folder 1/Folder 2`

and chmod 777 Folder 3

solefald
  • 2,303
  • 15
  • 14
  • I tried that it is not working. The permissions are not chnaging. i tried using chmod on mounted drive as root but its not chnaging ther permissions , they remian same. the command executes with no error but permissions stay same –  May 13 '10 at 04:26
  • @Trey yes u r right , the partition is ntfs. What should i do –  May 13 '10 at 04:28
0

Yes users on the network can modify files on a ext3 partition exported via samba over a network as they dont see the file system they see smbfs provided by samba.

So solution would be to re-format the partition as either ext2 or ext3 then export to your users via samba. Normal file permissions will work with chmod.

T

Tom Bell
  • 31
  • 2
0

Two ideas:

Can you create separate shares for each folder and control the access permissions through samba? I recognize this might not be ideal, but often security and ease of access are at odds.

You could try creating a directory in your server filesystem, and create symlinks to the various folder directories. Set the permissions on the symlinks and then share the newly created directory through samba.

Goyuix
  • 3,164
  • 5
  • 28
  • 37