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 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

share|improve this question
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 4: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 –  John May 13 '10 at 4:30
add comment

3 Answers

up vote 0 down vote accepted

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

share|improve this answer
add comment

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

share|improve this answer
    
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 –  John May 13 '10 at 4:26
    
@Trey yes u r right , the partition is ntfs. What should i do –  John May 13 '10 at 4:28
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

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