LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-31-2002, 09:02 AM   #1
BoonZie
Member
 
Registered: Oct 2002
Location: Malmoe Sweden
Distribution: Slackware 9.1
Posts: 50

Rep: Reputation: 15
Rights


I have created a server for our network at home. On that server I have a folder named Filer. I want all users to be able to use this as a shared folder. All users shall be able read and write in this folder and the folders/files within it, and also read and write in each others folders and files.
I used "chmod 777 Filer" to set the rights for my "1:st" folder, and that works fine, but I also wants everything in that folder to automatically get the same rights. Even when a new folder or file is created I want it to get that rights automatically.
Can this be done? And in that case how?
 
Old 12-31-2002, 10:01 AM   #2
niknah
Member
 
Registered: Dec 2002
Location: In front of a computer
Distribution: UPS, DHL, FedEx
Posts: 466

Rep: Reputation: 38
what do you mean by rights?

If you type...
chmod 2777 Filer

...all new files in the Filer folder will be set to the same group as whatever group owns Filer.

if you mean you want everyone to be able to read/write files someone else creates in that folder, then before someone uses that folder they may need to type...
umask 002

to allow anyone in your group to write to it.
 
Old 01-01-2003, 09:26 AM   #3
BoonZie
Member
 
Registered: Oct 2002
Location: Malmoe Sweden
Distribution: Slackware 9.1
Posts: 50

Original Poster
Rep: Reputation: 15
Hi
Thanks for answering.

Well, what I want is everyone to be able to read and write to every file and folder in my "Filer"-folder, and also every sub-folder in that directory. So i think what you describe is what i want, but I donīt really understand...

Lets say a user creates a folder named "Pictures" (in my Filer-folder) and in that folder saves a file named "pic1", that I wants to read, edit and then save again.
What shall the other user write, and does he have to write the same again if he then stores a file pic2?

In Swedish we call it rights, Iīm not sure what you call it English...
 
Old 01-01-2003, 10:07 AM   #4
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Permissions.

Language barriers are cool sometimes, like pissed, I really like that one

Your question:

I'd think that by adding these users to the same group, owning that directory and all subdirectories to this group, and allowing world perm's on it should give you the desired "permissions" you'd want.

So let's say you have Tom, John, Rob, and Carl. The folder you want to give everyone permissions to is /mnt/stuff

So we'd need to create a group:
vi /etc/group

And call it whatever you'd like, give it a special GID, I'd say something like 77777. Just something that isn't in use, and never will be by any normal user/process.

So now the last few lines in your /etc/group file might look like this:
users::100:tom,rob,carl,john
console:x:101:
newgroup:x:77777:tom,rob,carl,john

Ok, so now you need to own the directory and it's subfolders:
chown -R nobody:newgroup /mnt/stuff

This makes nobody the owner, and newgroup the group owner. Now we will chmod the directory and it's sub:
chmod 2777 -R /mnt/stuff

Now everyone in newgroup should be able to read/write/execute everything in the directory and it's subdir's. And from the post from niknah I am assuming the 2 before the 777 makes each new file have the same group ownership as the original folder.

Ok, so now I think that's it...

Cool
 
Old 01-02-2003, 02:12 AM   #5
BoonZie
Member
 
Registered: Oct 2002
Location: Malmoe Sweden
Distribution: Slackware 9.1
Posts: 50

Original Poster
Rep: Reputation: 15
Languages, Languages...

OK, I think I understand you. I will try that out, and tell you how it goes.

Thanks guys
 
Old 01-02-2003, 04:55 PM   #6
BoonZie
Member
 
Registered: Oct 2002
Location: Malmoe Sweden
Distribution: Slackware 9.1
Posts: 50

Original Poster
Rep: Reputation: 15
Well, it works fine with the files and folders that are in the directory when I do as you said. The problem now seems to be the new files. They don't inherit the settings from the Filer-folder, they are created as usual.
Is it possible to change the "standard-settings" for how files are saved in the whole system?
 
Old 01-02-2003, 11:18 PM   #7
niknah
Member
 
Registered: Dec 2002
Location: In front of a computer
Distribution: UPS, DHL, FedEx
Posts: 466

Rep: Reputation: 38
they don't inherit the group? or the rwx..... permission bits?

add a "umask 002" line to the end of the /etc/profile file.

this will make sure all new files are writable by the users's group.
 
Old 01-04-2003, 05:00 PM   #8
BoonZie
Member
 
Registered: Oct 2002
Location: Malmoe Sweden
Distribution: Slackware 9.1
Posts: 50

Original Poster
Rep: Reputation: 15
I tried, but I'm not sure if I have to make the os read the profile file again?
In that case how?
Will it work if the groupmembers connect both with samba and nfs?
 
Old 01-04-2003, 07:48 PM   #9
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
To have them "Reread" the /etc/profile without rebooting (as each user):
source /etc/profile

And I've got no idea about samba and NFS, but one would think that the answer would be yes, it will work.

Cool
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
The rights Gins Linux - General 11 06-08-2005 04:25 PM
Getting SU rights AmdMhz Linux - Software 2 04-13-2005 02:44 AM
do you know your rights? murray_linux Slackware 4 11-20-2003 06:28 PM
Directories rights bally Linux - General 2 11-01-2003 03:04 PM
Access rights sore Linux - Newbie 6 01-02-2003 11:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration