0

First I'm a newbie in Linux, but I read a lot these days about it.

I have a network and all my work files are in NAS drive. I start with an education purposes Ubuntu Server, with local messenger etc.

I figured out how to mount a folder from a local windows PC and sync it (with rsync) to the server PC, but I have an issue with the NAS.

Finally I managed to mount it, but I don't have permission to open the folders.

/etc/fstab config line is :

//192.168.1.108/Volume_1 /media/backup cifs credentials_nas=/home/MYNAME/.smbcredentials_nas,iocharset=utf8,uid=1000,gid=1000 0 0 

I want to make a full mirror of //192.168.1.108/Volume_1 to /media/backup folder. But I do not have access to the files in NAS.

Any advice?

  • Are you sure credentials_nas is a valid option for mount.cifs AFAIK it needs to be plain credentials – steeldriver Jun 9 '17 at 12:57
  • I've tried and : //192.168.1.108/Volume_1 /media/backup cifs username=*****,password=**** 0 0 but is the same. – Krasi Jun 9 '17 at 13:35
0

Did you set the correct uid and gid ?

Find out with:

$ id -u
$ id -g

If 1000 was correct, adding file_mode=0644,dir_mode=0755 should help:

//192.168.1.108/Volume_1 /media/backup cifs credentials_nas=/home/MYNAME/.smbcredentials_nas,iocharset=utf8,uid=1000,gid=1000,file_mode=0644,dir_mode=0755 0 0 
  • Yes - $ id -u and $ id -g are 1000, I've tried your correction but with no success. The interesting is that some of the folders are accessible, but the most are not. In to the NAS configuration is only one user and pass and every PC is using the same pass and user. I'v tried and separated user and pass, only for the server, but the result is the same. From windows PC with the same user and pass, everything is accessible. – Krasi Jun 9 '17 at 13:37
  • id -u and -g must be the ids on 192.168.1.108 in this case, right? – Stefan Falk Nov 28 '19 at 10:43
0

I solved the problem. I'm not sure exact reason for the problem, but i made two changes: The user name that I have used in samba was the same as my root user and pass. I changed it. The second was to edit the credentials and to remove the credentials_nas, as i was advised by @steeldriver. Restart samba and remount. Everything now is accessible and mount proper.

//192.168.1.108/Volume_1 /media/backup cifs credentials=/home/MYNAME/.smbcredentials,iocharset=utf8,uid=1000,gid=1000,file_mode=0644,dir_mode=0755 0 0

Thanks to everyone for your help!

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.