0

I am trying to mount a Samba Shared Folder in Ubuntu, but I am facing some issues because when the folder is mounted, I have no permission to write on mounted folder.

First of all, the shared folder is on a server called vmfox and the folder's name is apps. On VMFox server, I have this samba configuration /etc/samba/smb.conf:

[global]
        workgroup = MYDOMAINNAME
        netbios name = vmfox
        server string =
        security = DOMAIN
        encrypt passwords = true
        obey pam restrictions = Yes
        password server = server.mydomain.com.be
        pam password change = Yes
        passwd program = /usr/bin/passwd %u
        passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
        unix password sync = Yes
        log file = /var/log/samba/%m.log
        max log size = 0
        socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
        dns proxy = No
        wins server = 201.232.023.10
        kernel oplocks = No
        NIS homedir = Yes
        create mask = 0775
        directory mask = 0775
        printing = cups
        oplocks = No

[apps]
   path = /l/disk0/apps
   valid users = myuser,otheruser
   public = no
   writable = yes
   create mask = yes
   force user = www-data
   force group = www-data

So, with the configuration above I edited the file /etc/fstab on my local machine to mount the shared folder. First of all I created a file with my credentials: ~/.smbcredentials with the following content:

username=myusername
password=mypassowrd

And, finally, the file /etc/fstab with the following line:

//vmfox.example.com/apps  /home/rgiaviti/Dev/Network/vmfox  cifs  credentials=/home/rgiaviti/.smbcredentials,iocharset=utf8,domain=MYDOMAINDOMAIN,file_mode=0777,dir_mode=0777 0 0

OK. After everything, the shared folder is mounted using sudo mount -a. The problem is, I have no write permission in the mounted folder. When I access this shared folder in a Windows Machine, I can write normally in this folder.

I used this guide to mount and this question helped me too, but no write permission at all.

2
  • Can you change permissions like this: sudo chmod 777 /location/of/folder : this makes it read and write for everyone.
    – Mark Kirby
    Apr 1, 2015 at 20:20
  • If I change the permissions on the mounted folder on my local machine, this does not change the permissions at server, right?
    – humungs
    Apr 2, 2015 at 2:17

1 Answer 1

0

This command in /etc/fstab should help:

//server.domain.com/<shared_folder> /mnt/shared cifs uid=<username>,credentials=/home/<username>/.smbcredentials,iocharset=utf8,sec=ntlm,domain=AQUARIUS 0 0

In the file /home/<username>/.smbcredentials, use this format:

username=<username without domain>
password=<password>

Not the answer you're looking for? Browse other questions tagged .