Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
I've been running a Linux Red Hat 8 box for about a year now. I only use it for Samba file server, I use Win XP Pro on my 2 other boxes.
Each PC has it's own user name and password, but they are both members of the same group in linux. I have a shared directory that both can access and use. The problem I am having (which only started recently for some reason) is when one of the machines opens a file, and then changes, or edits it, then the file "belongs" to that user. When the other pc that did not edit this file tries to open it, it goes into READ-ONLY mode.
How can I change this so the owner does not change when someone edits a file? I have went into Konqueror and right clicked everything and changed the permissions that way... I have tried a few commands like "chmod" and "chgrp" thinking that would do somthing... well, maybe I don't know WTH I'm doing cuz I can't seem to figure it out.
The command chown is a bit confusing to me in format. Would it be possible to get an example to chown an entire directory. For example, say the directory "Documents" being changed to the group "Friends"
This would be greatly appreciated.
Oh, and if I do this will it automatically change EVERYTHING in that folder to be the same way? Subdirectories and all?
-R stands for recursive (which means it takes subdirectories and all the files in them also)
user is the user which is the owner of these files and subdirectories
group is the group of which users will have acces to these files and subdirectories
directory_name you know what stands for
Ok thanks much for all your help. Everything works now normally except for 1 thing :/ My Microsoft Access Database isn't working normally.. When I look at the group ownership, the rwx permissions etc. in Konqueror everything is fine. As soon as I open the database, it creates a file called "Database.ldb" only while the database is open, must be some sort of temporary file Access uses.. Well, that file is set for Read only. So while I have the database open I can use it, but no one else can open it. Vice versa.
I can manually change the permissions of this file and everything works fine... the problem being once everyone closes out of Access and the file dissapears... the next time its reopened it's back to its default permissions and only lets 1 user access it.
So let me ask you this. Is there any way to make it so that ANY NEW file will have the proper permissions set up from the start in this kind of scenario. A mask of some sort?
(Aggrivating situation seeing how this worked fine for a year, exactly the way it was supposed to so I know it's possible. Not sure what got messed up or changed recently to cause all these problems.)
Oh and Oplocks are set to off in my samba config file, which was a requirement for more than 1 person to Access databases like this off from a Linux box.
I know it is possible, but I don't know how. Maybe changing the ownership of the directory the database is in and changing the mod of the directory makes the new files as the directory in which they reside. You can try that, but I don't guarantee it will do anything helpful. Don't do it recursive though (do it without -R).
I think I just found something that I forgot a long time ago from another post I made. In samba you can set the umask which I beleive is the default settings for a new file created. For kicks I set the mask to 777 in samba and now everything works. Now I have to see what the more secure setting is as I beleive that this allows everything - which probably isn't good. But at least I think I'm on the right track!
Thanks again for all your help, I appreciate it greatly, I learned some new stuff.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.