LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-29-2016, 03:44 AM   #1
RedGunner
LQ Newbie
 
Registered: Feb 2016
Posts: 4

Rep: Reputation: Disabled
New to understanding Permissions


Hello all!! I am just looking for theory rather than commands here! Thank for your advice in advance.

So I just want to know what's the common practice of adding users and granting them access to a /home/user folder.

So if I add a user should I be granting Read, Write and Execute as a user but what about Group and Other? Should I be assigning groups to users (bearing in mind this is only going to a very small server)

I would like it so user1 can obviously see all his stuff, do what he wants etc but user2 cannot get into the folder and vice versa.
 
Old 02-29-2016, 03:49 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,475

Rep: Reputation: 2424Reputation: 2424Reputation: 2424Reputation: 2424Reputation: 2424Reputation: 2424Reputation: 2424Reputation: 2424Reputation: 2424Reputation: 2424Reputation: 2424
yes, the usual way is: only the user itself can/may access his/her own home dir.
 
Old 02-29-2016, 04:04 AM   #3
RedGunner
LQ Newbie
 
Registered: Feb 2016
Posts: 4

Original Poster
Rep: Reputation: Disabled
So the way I understand is you have USER-GROUP-OTHER in linux so I was doing research and found that 700 is

User can RWX
Group is ---
Other is ---

Okay so this works great and I change ownership of the folder to whoever should have it! It works great!! but I find any other file created after that is then defaulting to something I do not want it, so it's not inheriting this permission? How would I make it so it knows this?
 
Old 02-29-2016, 04:30 AM   #4
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,475

Rep: Reputation: 2424Reputation: 2424Reputation: 2424Reputation: 2424Reputation: 2424Reputation: 2424Reputation: 2424Reputation: 2424Reputation: 2424Reputation: 2424Reputation: 2424
see man chmod, man chgrp/chown, and man umask (this one is used to set some defaults)
 
1 members found this post helpful.
Old 02-29-2016, 04:59 AM   #5
aus9
LQ Guru
 
Registered: Oct 2003
Distribution: MX
Posts: 5,132

Rep: Reputation: Disabled
altho you are not looking for the commands as per OP, I suggest you as local user run this command
Code:
groups
If you have root powers instead of using commands and only if you want to remove or add new members from groups have a look at
/etc/group (no plural)

then consider if new members should get accesss to audio,video, <some-kind-of-hardware> etc
 
Old 02-29-2016, 05:09 AM   #6
RedGunner
LQ Newbie
 
Registered: Feb 2016
Posts: 4

Original Poster
Rep: Reputation: Disabled
I just would like it setup so users can only RWX execute their files, as best practice is always best to assign users to a group - How do people get around this issue of protecting their files from unauthorised users who can see the /home/ folder? Am I to assume that you can't hide files, you will always be aware of a user folder but "peek" into it.

Last edited by RedGunner; 02-29-2016 at 05:11 AM.
 
Old 02-29-2016, 05:22 AM   #7
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,475

Rep: Reputation: 2424Reputation: 2424Reputation: 2424Reputation: 2424Reputation: 2424Reputation: 2424Reputation: 2424Reputation: 2424Reputation: 2424Reputation: 2424Reputation: 2424
I can have my very own directory inside my home and I can set any kind of permissions on that.
 
Old 02-29-2016, 05:29 AM   #8
RedGunner
LQ Newbie
 
Registered: Feb 2016
Posts: 4

Original Poster
Rep: Reputation: Disabled
Well I am using root access so I am setting it up so it's secure when users are added to the system to be free to do what they want without the risk of other users see into their folder/files.
 
Old 02-29-2016, 06:01 AM   #9
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,475

Rep: Reputation: 2424Reputation: 2424Reputation: 2424Reputation: 2424Reputation: 2424Reputation: 2424Reputation: 2424Reputation: 2424Reputation: 2424Reputation: 2424Reputation: 2424
yes, although root always will have access to everything
 
  


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
Understanding File Permissions amirC Linux - Newbie 3 11-28-2013 02:42 AM
[SOLVED] Lack basic understanding of permissions(apache permissions problem) cK` Linux - Newbie 7 04-09-2010 12:49 AM
Looking for help understanding filesystems and permissions brockangelo Linux - Server 1 03-15-2009 01:36 PM
Understanding permissions veeruk101 Linux - Newbie 3 07-18-2007 05:21 PM
Understanding File Permissions username132 Linux - Software 13 04-03-2006 05:42 AM


All times are GMT -5. The time now is 10:54 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration