Ask Your Question
0

CIFS fstab entry is not working like it used to under Ubuntu

asked 2018-11-03 06:59:33 -0600

fordprefect gravatar image

updated 2018-11-03 07:43:23 -0600

Hello everybody,

I started switching to Fedora by installing it on the first PC today. I am migrating from Ubuntu 16.04.

I have a Synology NAS in my network to which I connect via SMB3. In the past I created for each shared folder on the NAS which I wanted to mount a Folder in ~/Mounts/. I created a ~/home/USER/.smbcredentials file with my login data and added to /etc/fstab for each folder the following line:

//NAS-IP/Share /home/user/Mounts/Share cifs _netdev,noauto,vers=3.0,users,credentials=/home/USER/.smbcredentials,uid=1000,gid=1000 0 0

Doing the same under Fedora 29 does not work. It creates a link in Nautilus, but when I click it the message:

This program is not installed setuid root - "user" CIFS mounts not supported.

I am a bit afraid to play around to much with this, because I don't want to cause problems on the NAS. The beforementioned method under Ubuntu caused that every file I create or changed was connected to the account on the NAS, whereas the username on my PC and on the NAS was identical. Before sorting that out this was not the case, which caused problems, because the NAS didn't know to whom the files belonged. If I remember correctly also the mount point under home was connected to this issue.

Actually I am a bit of a noob, when it comes to samba and user IDs etc. Maybe there is a link to get this done the Fedora way. I am also open up to different solutions. All I need is a little bit help to get a reliable and robust connection to my NAS with little to no chance that I corrupt the file system on the NAS or mess up the file possessions.

Edit: This might be an important information: Actually in the GUI of the Synology NAS one can not see the GID and UID of the users. So I logged in via ssh as my root account and from cat /etc/passwd I figured out that the UID of my user account is 1026 and the GID is 100.

edit retag flag offensive close merge delete

Comments

Edit: It seems the UID and GID comments don't cause anything. When I remove them on my Ubuntu laptop and create a file, the uid and gid are again 1026 and 100 as for the NAS user.

But I figured out that the UID and GID on my Ubuntu system as also on the Fedora system are 1000 and 1000. Are the UID and GID comments relevant for the server side or for the client side?

fordprefect gravatar imagefordprefect ( 2018-11-03 13:00:25 -0600 )edit

And since it is related to this topic: On the NAS there is an option in the SMB configuration which is unchecked and described as followed: Apply default UNIX permissions: Enable this option to apply the default UNIX permissions when uploading or creating files and folders. The UNIX permission will be 744 for files and 755 for folders. When this option is disabled, UNIX permission is 777 for files and folders.

Again it is not clear for me whether this relates to the client side or to the files and folders on the NAS.

fordprefect gravatar imagefordprefect ( 2018-11-03 14:25:58 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2018-11-03 08:09:12 -0600

ed209 gravatar image

A forum search wouldn't be a bad idea:

https://ask.fedoraproject.org/en/ques...

edit flag offensive delete link more

Comments

I did the search and found the thread but it appeared as a different problem to me. But as I said I am not an expert.

fordprefect gravatar imagefordprefect ( 2018-11-03 08:13:21 -0600 )edit

Apart from searching, one should read the link as well. It solves your problem and explains pretty in detail what to do in order to mount CIFS.

ed209 gravatar imageed209 ( 2018-11-03 20:08:34 -0600 )edit

Sry, I tried it out now. Please see my answer above. Maybe you can ensure me on my findings and help out with some of the questions.

fordprefect gravatar imagefordprefect ( 2018-11-04 04:20:45 -0600 )edit
0

answered 2018-11-04 04:19:29 -0600

fordprefect gravatar image

Sry, I understand now what the problem was. Apparently my fstab entry resulted in the user running mount and the message told me that the user doesn't have the privilige. I tried out the method in the link and apparently it worked. However it would be nice to get a feedback to the following points, because I really want to understand what I am doing.

So I changed the mount point to /mnt/Folder and used the following options for cifs "credentials=/home/user/.smbcredentials,vers=3.0,uid=1000,gid=1000 My understanding is now that uid and gid is only relevant for the client system. If I don't set them the mounted files belong to root on the client system and I can't access them. On the host system no matter what I do while mounting the files and folders always get the rights and possessions of the user on the host I logged in as.

The _netdev.noauto,users options I don't need anymore since I use the automount method of systemd. If I remember correctly I added this to mount and umount it on need and to not get errors when the NAS is not running.

Does the method with automount mount the share when booting up? This would not be a dealbreaker but not perfect either because it would wake up the NAS everytime the system boots. The TimeoutIdleSec option is also nice to make sure the Share is not mounted when not needed. Question is, what happens if there is reading or writing or a fole opened and the timeout occurs. For the last one I opened a txt file and waited. Apparently the Share is unmounted while the file is still opened. A save mounts it again. I wonder whether problems could arise from this.

edit flag offensive delete link more

Comments

No comment on this questions? I really would like to understand.

fordprefect gravatar imagefordprefect ( 2018-11-10 12:04:48 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-11-03 06:59:33 -0600

Seen: 54 times

Last updated: Nov 03