Mount external cifs share and set permissions

Piet200

New Member
Joined
Jul 31, 2025
Messages
4
Reaction score
0
Credits
41
I have a fritxbox router with an external disk connected. This is shared as an SMB share.
When I mount this share to my raspberry pi 4B, I can access it, but I don't have the right permissions.

I tried to connect with a credentials file, tried with uid/gid, but none of the commands will work.

mount -o //<source path> /<mount path> cifs uid=1000,gid=1000,credentials=/etc/.smbcredentials 0 0

Any suggestion how to get this mount with the proper permissions?
 


 
When you say permissions.... what permissions? On which side?

Most Windows file systems do not support Linux ACLs.
The most common compression on Windows (zip) doesn't support Linux ACLs.
Most Linux file systems do not support Windows ACLs.

So then.. you have pick which side you want to be the "boss" of the permissions.
If using Windows as the boss... then CIFs and filesystems alone aren't enough.. you to put the Linux computer
in a Windows ActiveDirectory domain and join that computer to the domain with Samba or something similar.
Then the permissions will transfer between the two computers.
 
I have a fritxbox router with an external disk connected. This is shared as an SMB share.
When I mount this share to my raspberry pi 4B, I can access it, but I don't have the right permissions.

I tried to connect with a credentials file, tried with uid/gid, but none of the commands will work.

mount -o //<source path> /<mount path> cifs uid=1000,gid=1000,credentials=/etc/.smbcredentials 0 0

Any suggestion how to get this mount with the proper permissions?
IN THE mount line. add dirmode=0777 and filemode=0777 that should give the permissions
 
IN THE mount line. add dirmode=0777 and filemode=0777 that should give the permissions
I am trying to keep the command as simple as possible, because most of the time my rpi says: mount: bad usage

I tried the command like below, but also this gives the bad usage message.

mount //<source path> /<mount path> cifs dirmode=0777, filemode=0777

Have I cleaned the command too much?
 
you did clean it a bit much. user and password are usually included in the mount command in this case. I trust you are putting this into the fstab file located in the /etc folder. Here is a sample of the line I use
//10.10.10.90/LiSS /mnt/LISS cifs username=xxxx,password=xxxx,dir_mode=0777,file_mode=0777 0 0

this is taken from fedora but I am fairly sure the same line works in other distros. Might need to adjust a little.
 


Follow Linux.org

Staff online

Members online


Top