Hello, I need to mount 4 folders from 4 different Windows PC's. Folders are shared in a Windows domain network. The idea is that web application located on /var/www/clients/client1/web1/web reads the files located on those 4 folders. I followed this: https://wiki.ubuntu.com/MountWindowsSharesPermanently guide and took some from this: http://askubuntu.com/questions/354235/fstab-wont-mount-share-cant-see-what-im-doing-wrong but I constantly get: Code: mount error(95): Operation not supported Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) I added this to /etc/fstab: Code: //192.168.1.200/log /var/www/clients/client1/web1/web/csv/server_log cifs credentials=/var/www/clients/client1/web1/web/csv/.smbcredentials,iocharset=utf8,dir_mode=0777,gid=1000,uid=1000,sec=ntlm 0 0 and my .smbcredentials file looks like this: Code: username=administrator password=password domain=mydomain.local Please help.
No, I'm not. I just got it from those tutorials. How to know the real uid and gid? The idea is that web1 can read/write the contents of those folders.
run: ls -la inside the web folder, you will then see which user and group owns the web folder. This user and group are the web user and client group of this website. Then tale a look inti the /etc/passwd and /etc/group file to lookup the numeric ID of the user and group.
Till, This is what I get when I run ls -la (please see the attachment). And uid and gid of the web1 client1 are 5005, I'm guessing?
So the complete line that I should add to etc/fstab should be: Code: //192.168.1.200/log /var/www/clients/client1/web1/web/csv/server_log cifs credentials=/var/www/clients/client1/web1/web/csv/.smbcredentials,iocharset=utf8,dir_mode=0777,gid=5005,uid=5004,sec=ntlm 0 0 ?
I run servers in datacenters only, there are no windows pc's in such a setup as this would be way to insecure to expose their network shares to the internet
Thank you for your support but again I get the same error: Code: mount error(95): Operation not supported Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
Ok, so Ive managed to get it to work with this line in /etc/fstab: Code: //192.168.1.51/EXPORT /var/www/clients/client1/web1/web/csv/1 cifs credentials=/mnt/.smbcredentials_domain,iocharset=utf8,gid=5004,uid=5005 0 0 But when I access web/csv/1 folder with FilleZilla and try to edit/create new file it says: Code: Command: MKD /web/csv/1/New directory Response: 550 Can't create directory: Permission denied I have tried with gid=0, uid=0 (root) but it is the same. My /mnt/.smbcredentials_domain file looks like this: Code: username=administrator password=[password] domain=[my_domain] (without ".local") I point out that user my_domain\administrator has read/write access to 192.168.1.51/EXPORT folder in Windows. I just tried adding: Code: dir_mode=0777 to /etc/fstab line but still no read/write access. UPDATE 1: I am able to read/write files if connect to server with WinSCP using root account. UPDATE 2: Success! When I looked at the owner of the folder "/var/www/clients/client1/web1/web/csv/1" with WinSCP it was web2. Then I created new folder with FilleZilla, looked at it with WinSCP and the owner of the new folder was web1. Then I just changed the line in /etc/fstab and now I have read/write acces. Finally!
Acctually, this: Code: //192.168.1.51/EXPORT /var/www/clients/client1/web1/web/csv/1 cifs credentials=/mnt/.smbcredentials_domain,iocharset=utf8,dir_mode=0777,gid=0,uid=0 0 0 is the complete line in /etc/fstab and I have read/write access on 4 different Windows PC's, so I added 4 lines in /etc/fstab - different IP's and folders (1, 2, 3 and 4).
The part: gid=0,uid=0 instructs the system to allow access only to the root user. Thats why you can access it as root only. you have to set this to the user and grup that shall access the files. Then you should try to add the option "rw" to allow rite access. See also smbmount manpage http://linux.die.net/man/8/smbmount