[SOLVED] Why can't I give write permissions to a mount point
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
The shared drive is on Ubuntu 18 and shared by Samba. The mounting system is on Ubuntu 20
This is how I am sharing the device:
Quote:
[share]
comment = Steve's Public folder
path = /home/steve/share
create mask=0777
directory mask=2777
read only = no
browsable = yes
guest ok = yes
force group = steve
force user = steve
ntlm auth = true
writeable = yes
public = yes
"Local permissions on the mount-point directory" mean nothing: that directory is merely a dummy placeholder. You have to establish permission using the facilities of "whatever has been mounted at that location." Since this is a Microsoft/SMB mount point accessed through Samba, permissions are established on the Microsoft server-side and you should start your explorations with those logs. Samba maps your Linux user-identity to something that the server will recognize, and the server determines what you can do. I recommend that you proceed by reading a lot about Samba and how it relates to Microsoft's somewhat-byzantine security protocol.
As a categorical statement: any remote filesystem that you mount "is the property of" the remote side and operates according to its rules. "Your identity," as seen by the remote side, is what determines the permissions that it will or will not grant. And there are many ways which can be used to establish that identity-mapping, depending on the exact situation.
Last edited by sundialsvcs; 08-26-2022 at 12:08 PM.
As posted CIFS/SMB permissions do not map to linux permissions which is why chmod does not do anything.
Because CIFS/SMB mounts are generally single-user, and the same credentials are used no matter what user accesses the mount, newly created files and directories will generally be given ownership corresponding to whatever credentials were used to mount the share which is root. By creating a special group and adding all those users to that group you can mount the share with the gid=XXX to allow anyone in the group to read/write.
Usually if someone mounts the share in their file browser it will be automatically mounted as that user. However, it isn't available to the command line without running additional commands.
On the Ubuntu 18 PC in the file browser you should be able to right click on a directory and select "local network share", click on the read/write and guest access boxes. Click create share.
On the Ubuntu 20 PC you can access the share from the file browser just by entering smb://server_name/share_name
You haven't actually said what OS the other (remote) users are on.
If it's some sort of *nix, then nfs is more usual, but for MSWin clients, then yes, Samba is 'normal'.
Yes. Your posts above indicating you have a server setup on 18.04 with a client on 20.04 so use the Ubuntu documentation at the link below to set it up. It is not dsifficult.
You haven't actually said what OS the other (remote) users are on.
If it's some sort of *nix, then nfs is more usual, but for MSWin clients, then yes, Samba is 'normal'.
I had been using the samba share mounted on PCs (and mapped to drive Z) for a couple of years. Permissions only became a problem when I tried to mount the drive on another Ubuntu system so that I could pipe data to the shared drive.
So, I think my original question is wrong. I assumed that it was simply a permissions problem.
[QUOTE=yancek;6376207]Yes. Your posts above indicating you have a server setup on 18.04 with a client on 20.04 so use the Ubuntu documentation at the link below to set it up. It is not dsifficult.
I had been using the samba share mounted on PCs (and mapped to drive Z) for a couple of years. Permissions only became a problem when I tried to mount the drive on another Ubuntu system so that I could pipe data to the shared drive.
So, I think my original question is wrong. I assumed that it was simply a permissions problem.
Hmm, I could try sharing the folder with nfs for the Ubuntu computers... Thanks for the tip.
nfs has its own idiosyncrasies. Another suggestion might be to use sshfs which is a fuse filesystem for sftp. Using automount or autofs would only mount the share when accessed.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.