File ownership on SMB shares

File ownership on SMB shares

Postby rodgoslin » Oct 5th, '19, 02:22

Some while ago, I raised a thread in reference to the draxtools in the Mageia Control Centre Access Windows (SMB) files and directories. This function does not work well, and I raised a bug report on it. That was in 1917, and the situation now, in Mga7 is, if anything worse than it was then. With Mga 6 I gave up on the 'official' procedure and wrote out the /etc/fstab command from scratch. One of the problems associated with the 'official' route was that all directories and files were owned by root, and therefore could not be written to by user. After a fair amount of research on other distro's, i found that by adding uid=(username) and gid=(groupname) to the command the files, etc would be owned by me and writing was routine.
It did come to me later that fstab is read at boot, before any user had logged in, and ownership would be determined as that set in fstab, no matter who logged in. It doesn't present a problem to me, since I'm the only user on the system, but it didn't go well with Linux being a multi user facility.
Giving it some thought I can see a way out. If I created a user where all categories, owner, group and world had read and write permissions, on boot, the mounted remote system would be owned by the new user, but all who logged in would have the full set of permissions to the mounted file structure. There would be no need, ever, to login as this user, which would be there only to own the mounted file structure.
Can anyone see any objections or alternatives to this. As far as I can see, the only change required with the new account is to add umask 000 to .bashrc.
FWIW, I've raised another bug report on this original problem, with a mention of this workaround.
Last edited by isadora on Oct 5th, '19, 08:21, edited 1 time in total.
Reason: Topic moved into appropriate sub-forum.
Posts: 450
Joined: Nov 19th, '11, 01:31

Return to Networking

Who is online

Users browsing this forum: No registered users and 1 guest