You are not logged in.
Hi,
I have a problem with a Samba drive. I have this line in my fstab (it was working just fine before christmas holidays):
//scapa4.chem.gla.ac.uk/scapa4 /run/media/djipey/scapa4 cifs username=<login>,password=<password>,iocharset=utf8,sec=ntlm,x-systemd.automount,vers=1.0 0 3When I run the mount command (sudo mount /run/media/djipey/scapa4), the drive is mounted correctly but I can access it only in read mode, I can't write on the drive.
When I mount the drive in nemo (https://wiki.archlinux.org/index.php/sa … nd_PCManFM), I have read and write access.
Could you please help me to sort this out ? I sometimes need to mount this drive when I'm connected by ssh on my machine.
Cheers
Last edited by djipey (2018-01-11 13:24:57)
Offline
nemo will use gvfs.
Compare the outputs of "mount" for each case. The difference should be telling.
Online
Here is the ouput for "traditional" mount:
sudo mount -v /run/media/djipey/scapa4
mount.cifs kernel mount options: ip=some.numbers,unc=\\scapa4.chem.gla.ac.uk\scapa4,iocharset=utf8,sec=ntlm,vers=1.0,user=user_name,pass=********How do I mount it with gvfs ?
Offline
No, the output of literally "mount" - it prints mtab.
Online
Ah ! Sorry.
Here you are:
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
dev on /dev type devtmpfs (rw,nosuid,relatime,size=8150520k,nr_inodes=2037630,mode=755)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
/dev/sda5 on / type ext4 (rw,relatime,data=ordered)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
/dev/sda6 on /home type ext4 (rw,relatime,stripe=32745,data=ordered)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=1631260k,mode=700,uid=1000,gid=1000)
//scapa4.chem.gla.ac.uk/scapa4 on /run/media/djipey/scapa4 type cifs (rw,relatime,vers=1.0,sec=ntlm,cache=strict,username=<username>,uid=0,noforceuid,gid=0,noforcegid,addr=130.209.221.109,file_mode=0755,dir_mode=0755,soft,nounix,serverino,mapposix,rsize=61440,wsize=65536,echo_interval=60,actimeo=1,x-systemd.automount)The drive is mounted with fstab, and also with nemo. But I don't see nay trace of "gvfs".
Offline
There's no difference?
That mount should be rw, you should be able to write on it. Sure it's not just a file permission issue? Can you "sudo touch /run/media/djipey/scapa4/touch.test"?
Online
Ok this is weird. With sudo I can write on the disk, but not from my current user.
This is really weird because it wasn't like that before christmas, and I didn't change anything (but the NAS running the Samba drive did change though).
We are two Archlinux users in my lab and we both have the same problem.
The right of the directory is:
drwxr-xr-x 755 scapa4should it be 775 ?
Offline
stat /run/media/djipey/scapa4
idOnline
Stat:
Fichier : /run/media/djipey/scapa4
Taille : 0 Blocs : 0 Blocs d'E/S : 16384 répertoire
Périphérique : 19h/25d Inœud : 256 Liens : 2
Accès : (0755/drwxr-xr-x) UID : ( 0/ root) GID : ( 0/ root)
Accès : 2017-12-20 20:12:20.652180200 +0000
Modif. : 2018-01-10 14:23:34.480854900 +0000
Changt : 2018-01-10 14:23:34.480854900 +0000
Créé : -id
uid=1000(djipey) gid=1000(djipey) groupes=1000(djipey),10(wheel),14(uucp),54(lock)Offline
This is on the mounted path?
As you can see, only root may write there.
You could re-own it to eg. the wheel group (or any other group you add you and your co-worker to) and set it 775
Of course if you want to only write into a subdirectory of that path, fix permissions of that directory.
This is indeed about the NAS (the permissions are mapped to your local system).
Online
I did a "sudo chown :wheel /run/media/djipey/scapa4"
and a "sudo chmod 775 /run/media/djipey/scapa"
but it seems the right on this directory is still 755. What am I missing ?
Last edited by djipey (2018-01-10 15:59:37)
Offline
file_mode=0755,dir_mode=0755
dir_mode=arg
If the server does not support the CIFS Unix extensions this overrides the default mode for directoriesIt would seem the NAS got limited here with its update? Can you chmod subdirs? Chown works?
Online
I can't chmod 777 subdirs (well the command returns no error, but the permissions don't change), and chown doesn't work. Can I use something else than cifs in fstab to mount this drive ?
Offline
You could just specify the UID and GID of your user in the mount options, if you don't need more fine grained control.
Last edited by V1del (2018-01-11 10:42:26)
Offline
Yep, that works. Does it mean it will only be mounted for me (one gid/uid) ?
Offline
It especially means the server doesn't support file permissions.
You can use the uid/gid config to assign ONE user/group combination to everything and the file_mode/dir_mode parameter to control how that user and that group can access *every* file/directory on the share.
What exactly happened with the NAS? Do you have access to the SMB server config? Is the underlying filesystem NTFS (or FAT)?
Online
ok thanks for the explanation.
What happened to the NAS, I have no idea. I don't administrate it. I just know that it was changed during the holidays, but I don't know who did it or what he did ![]()
I just know that its messy: we still use Samba 1.0 ![]()
Offline