2

I have a CentOS 6.5 server with a share that is and should be accessable for and from everyone. All content placed on that share should be accessable by everyone. So I created a share with this parameters in smb.conf file:

[global]
security = share 

[VODSTOR]
        comment = VOD Storage Array
        path = /storage/internal
        browseable = yes
        force user = nobody
        force group = nobody
        writable = yes
        create mask = 0666
        directory mask = 0777
        public = yes

As far as I know, this should give everyone that access this share the ability to create files and folders. Folders with drwxrwxrwx rights, and files, -rw-rw-rw rights, right? this seems to work from a windows perspective... folders created there have the drwxrwxrwx permission bits. and files seems to be readable by all. But when I mount this folder on a Debian Linux machine folders are created with drwxr-xr-x, That I think is weird..

On the debian machinie I mount it via fstab with: \ \mnt\path\ cifs rw,user=nobody,pass=nobody 0 0

What is wrong there...? Can't seem to find useful info on the web so far.

1

maybe you need to use setfacl -Rm d:g::rwx /home/Filmy or setfacl -Rm d:o:rwx /home/Filmy

And force directory mode = 0777

1

You're almost there. Your mount command is wrong though. It should be this

/mnt/path cifs rw,noperm 0 0

If you leave the user and group unspecified the underlying permissions get applied. The noperm tells the client not to try and "second guess" the access controls. Otherwise you'll find that the local apparent permissions get in the way.

0

I think, the best for you will be that:

[global]
    security = user
    unix extensions = no
    map to guest = Bad User
    public = yes
    guest account = nobody
    create mask = 0666
    directory mask = 0777
    force create mode = 0666
    force directory mode = 0777

[VODSTOR]
    comment = VOD Storage Array
    path = /home/Filmy
    guest ok = yes
    force user = nobody
    force group = nobody
    writable = yes
    browsable = yes
    public = yes

HTH, Cheers

  • I'll give it a try – SHLelieveld Sep 15 '14 at 13:22
  • It still creates files and folders from a linux machine on this storage with wrong rights. folders with 755 files with 644, Anybody else have a solution? – SHLelieveld Sep 17 '14 at 6:41
  • It's not it looks like. Do an ls on cifs mount point and on real directory path that samba exports. You will notice a difference. It all about mount.cifs options. But in real directory path there will be files and directories exactly thei are force in samba configuration. – Scyld de Fraud Sep 19 '14 at 8:13
  • 1
    @user67588 How do you create dirs, with smb share, or directly on linux? – Krzysztof Stasiak Jun 9 '17 at 7:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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