8 Replies Latest reply on Jan 17, 2013 9:45 AM by 974969

    Samba share permissions

      I have a Windows share that is mounted to my Oracle Linux box. I am trying to change the permissions on the mount point to be 777 it keeps telling me permissions denied. Right now the permission are 755. I run the command chmod -R 777 /cfpb and get the following.

      chmod: changing permissions of `cfpb/': Permission denied

      I am running this command as root.
        • 1. Re: Samba share permissions
          That's probably for good reasons if you care about file level security. There is no connection between the root user and the Windows administrator of a remote system. The permissions of a remote share are determined by software providing the share (Windows). You may have some success changing permissions by trying to mount the share as the appropriate remote Windows administrator.
          • 2. Re: Samba share permissions
            It is mounted as the correct user which has a windows account. That user has full control on the folder and can write to it. I need other users to be able to. It seems to be using the Linux permissions because I added myself to the Windows share logged into the Linux box and could not write to the file. Any suggestions?
            • 3. Re: Samba share permissions
              What version of windows? Have you checked the NTFS permissions on the target file system. Just creating a share and giving it "Full control" doesn't get you there.
              • 4. Re: Samba share permissions
                Please show the complete command and not just only the error message. It might also help to give a real example of what you are experiencing and expect. Also include information about the full OS versions/distributions involved.
                • 5. Re: Samba share permissions
                  Windows Server 2003. Yes the NTFS file permissions are correct.
                  • 6. Re: Samba share permissions
                    I am running Oracle Linux Server release 6.3 and Windows 2003 Server. I created a mount point called cfpb on the Linux server. I have a share on the Windows server called cfpb. The share is mounted as oracle. I edited the /etc/fstab with the following line.

                    //WindowsServer/cfpb /cfpb cifs user=oracle,password=%%%%%,uid=oracle,gid=oinstall o o

                    I have also tried to add umask 0000 and umask 0777 of which I got the same result. I ran the command chmod -R 777 on the cfpb directory when it was unmounted. So the file permissions unmounted are: drwxrwxrwx...When I mount it they go to: drwxr-xr-x... I try to run the command chmod -R 777 cfpb while it is mounted and get the following error:

                    chmod: changing permissions of 'cfpb/': Permission denied. I am doing this as root as I believe I can not use chmod as the oracle user.

                    We have another server windows server that has a share mounted on a SuSE Linux box with identical NTFS permissions and I am able to change the Linux permissions to 777. When I mount that share on the Oracle linux box I get the same issue as above.
                    • 7. Re: Samba share permissions
                      Your problem is most likely not Linux but Windows.

                      Authentication of users under Windows can be based on local or active directory accounts. Is the other Linux machine (SUSE) part of a Windows AD domain? Is one system perhaps authenticating using a machine local account (Oracle), whereas the other uses a domain account, with different access permissions? There can also be machine specific access restrictions set on the Windows server side.
                      • 8. Re: Samba share permissions

                        The folder that you mount it, did you check if you have full control(in share options under windows) to the folder to the user that you used to mount the folder

                        Good luck