1

I am helping a retirement aged friend to modernize his tiny office & it now has 4 PCs all running Ubuntu Mate 18.04.3 . (I've been trying to get this help at the U/M forum as well...it is still unresolved.)

His entire small LAN is behind a dedicated firewall which has done a great job 'till now, and it is all on cable internet without a static IP.

I've been having an awful time making file sharing work for him, his young assistant and his office lady due to the unreliability of file permissions that seem to wander for no obvious reason(s).

Samba itself has been a bit of a nightmare & gave me fits until I discovered how to make Nautilus do the initial heavy lifting & all 3 of them now have 'Public' dirs as well as the sort of rudimentary server box that is where they store & retrieve the shared documents as they need them.

Just recently was the very 1st I'd ever heard of caja-share in a thread from 2015 - and it looks to just duplicate what Nautilus also does, really, so I didn't make use of it.

What is desired is the ability to use & move documents - mostly PDFs & DOCX files, freely & without ANY concerns for permissions AT ALL via their tiny LAN.

After reading a skazillion guides & trying everything under the sun that I could find, I cleaned off all the Samba stuff that I had tried that did not work & just used Nautilus to move forward with it.

The Nautilus method did actually work - but there STILL are strangely creeping permission changes that pop up....whenever and tie Libre Writer into tangled knots when they occur - as well as oddities just trying to attach files to emails that cause app crashes for no apparent reasons.

I do not (yet ??) know how to set default file permissions to R/W for all, which is my goal in asking this here.

The app crashes being caused by wandering file permissions ARE a serious nuisance as I live 120 miles from his small home office, and so I mostly rely upon remote access to help these folks rather than rushing there time & time again.

Also: NFS seemed to be the other option when I was investigating file sharing; So I read a whole bunch of write-ups about it - and then I didn't dare to try making it happen as it was not only quite complicated (to my eyes...), but also in examining 10 different user's methods (for example) they had common steps woven in between very different steps - which worried me greatly.

No restrictions are needed in this small place as the man himself has his private files sequestered to his liking & the other 2 users are never any problem with regards to those files - all else is shared openly & deliberately.

All the PCs have UPSes - and off-site backups have been made & kept for years already - and there are no large media (or other) such files since it is all about documents at his place.

Should there be a very clear, step-by-step guide to NFS sharing which my small brain can make use of, I may try it, but given that my time on-site is very limited and that Samba is already (mostly ??) working there - such a change may cause more troubles than trying to remedy the ills of the existing configuration...and how would I know this beforehand ??

All the above in short then: Is there some way to configure the contents of an entire disk partition for full R/W access by all the users on the LAN ??

Thanks in advance for any helpful replies here !!

mark
  • 311
  • 1
  • 3
  • 14

1 Answers1

2

[1] You stated you asked this question in the Ubuntu forums. If you could provide a link it would help since I cannot find it.

[2] What is missing from your question is how you are currently set up. It is difficult to offer a definitive answer without seeing what you shared, what filesystem is being used, etc ... Posting the output of the followings commands would help:

testparm -s
net usershare info --long

[3] It sounds like you created the share using Nautilus so one way to do this is:

Let's say you allowed guest access with read / write ability.

Let's say you want everyone on the LAN as well as the local user on the box itself to have full read / write access to everything in that share.

Edit /etc/samba/smb.conf and right under the workgroup = WORKGROUP line add this one: force user = xxxx

Replace xxxx with the user on the samba server who owns the mounted partition.

Then restart smbd:

sudo service smbd restart

Any time anyone on the LAN does something in that share they will do so as the user xxxx. Since xxxx is also the local user on the server all the files there will be his.

After the change this will apply to all new files added from the client. You will need to do some cleanup with the files that are already there.

Morbius1
  • 7,761
  • This force user is the method I have found to work for me as well. – Organic Marble Jan 12 '20 at 17:34
  • Wow !! The force user idea is totally new to me - thanks !! Too bad it doesn't apply to existing files though, as there are ~20 years of nested directories that get re-used by these folks. What I'd really prefer is to somehow magically eliminate all permissions from the shared file SNAFU and/or change ownership on ALL of them at once. Even though the sharing box is run by 'user', for some reason many of the perms say that ROOT owns the files & it is a real PITA to change - and this seems to be what causes the apps trying to use those files to crash. All my efforts use EXT3 - nothing else. – mark Jan 13 '20 at 04:46
  • @mark Changing the ownership recursively can be done in one command sudo chown -R youruser yourbasedirectory. Be carefull, There is no way back. So I suggest to statt in a sub-sub....sub directory to check if everything runs fine. For more details, see eg Change folder permissions and ownership – Marc Vanhoomissen Jan 13 '20 at 12:58
  • Thanks Marc !! Unfortunately what I meant in my prior comment is that many, many of the files in that partition seem to belong to root & that they seem to resist changing ownership very stubbornly !! If I could somehow change that entire partition's ownership for ALL files at one shot that would surely create some VAST relief !! – mark Jan 14 '20 at 00:20
  • That is exactly what a recursive chown will do. Go through every file and folder and change the owner to you. – Morbius1 Jan 14 '20 at 19:18