You are not logged in.

#1 2022-08-31 10:35:14

ihitmani
Member
Registered: 2021-05-03
Posts: 83

[SOLVED]cifs/ samba no write permission

HI, I am able to mount cifs, but I do not have write access to it, any ideas ?
samba.conf:

[user]
        comment = User share
        public = no
        valid users = user
        read only = no
        writeable = yes
        path = /home/user/bf-data/user/files

manual mount command :

sudo mount -t cifs -o user=user,vers=3.0 //hmara/user hmara

systemd mount :

[Unit]
Description=Mount Share at boot
Wants=network.target
After=network-online.target
After=remote-fs-pre.target
After=network.target
Before=remote-fs.target

[Mount]
What=//192.168.10.2/user
Where=/home/v/hmara
Options=_netdev,credentials=/home/v/.sys/hmara-creds,iocharset=utf8,rw
Type=cifs
TimeoutSec=5
ForceUnmount=true

[Install]
WantedBy=multi-user.target

UPD:
manual mount has write permission with next line :

sudo mount -t cifs -o user=user,vers=3.0,rw,file_mode=0777,dir_mode=0777 //hmara/user hmara

UPD: systemd mount allow to create files, but not allow to delete it, in order to delete the file, sudo / root permission required...

Options=noauto,noperm,vers=3.0,rw,credentials=/home/v/.sys/hmara-creds,iocharset=utf8,file_mode=777,dir_mode=777

UPD: after reboot problem gone, hmm

Last edited by ihitmani (2022-08-31 15:29:27)

Offline

Board footer

Powered by FluxBB