LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 03-31-2017, 11:45 AM   #1
holadebob
LQ Newbie
 
Registered: Mar 2017
Posts: 5

Rep: Reputation: Disabled
Users can only copy/paste files when I set their permissions to 777.


We are trying to set up two users, bob and mary, and both home directories have permissions of drwxr-xr-x. bob is assigned to user group bob,clark, and mary is assigned to user group mary,clark. Admin is clark.

We cannot figure out how to allow bob and mary to copy/paste files and directories inside their respective home directories. mary and bob each have private folders in their home directories that we have been trying to set permissions for. We want bob and mary to each be able to read and write to their own private folders. When we set the private folders permissions to 775, the contents are not writable. In fact, after trying many combinations, 777 is the only permission that will allow bob and mary to copy/paste within their private folders.

Everyone says don't use 777, so we are confused.

The command we are using from root in admin is chmod -R 775 /home/bob/Bob for example, Where Bob is the private folder.

We are using Mint 18.1 Cinnamon on a pc, on one hard drive.
 
Old 03-31-2017, 12:05 PM   #2
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 5,607
Blog Entries: 3

Rep: Reputation: 2851Reputation: 2851Reputation: 2851Reputation: 2851Reputation: 2851Reputation: 2851Reputation: 2851Reputation: 2851Reputation: 2851Reputation: 2851Reputation: 2851
Welcome.

It's a little trickier with group permissions that it ought to be. It comes up often enough that I've written about how it can be done:

https://www.linuxquestions.org/quest...e-users-37043/

That's aimed at a different directory, but you can definitely apply the technique to home directories.
 
Old 03-31-2017, 12:06 PM   #3
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138
Please post the output of:
Code:
id bob
ls -ld /home/bob /home/bob/Bob
Also note that a user's ENTIRE home directory should be private, not just one subdirectory contained within. Things can get screwy fast if users are allowed access to other users' home directories (for example, SSH keys will not work if other users have access to your home directory). It's MUCH better to set up a neutral 3rd location that they can both access for shared work.

Last edited by suicidaleggroll; 03-31-2017 at 12:11 PM.
 
Old 03-31-2017, 12:35 PM   #4
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 1,737

Rep: Reputation: 789Reputation: 789Reputation: 789Reputation: 789Reputation: 789Reputation: 789Reputation: 789
When you say private folder you certainly mean shared or public folder.
Shared folders must have a group that is common to both users and 775 permission.
It can be a common primary group in passwd or a secondary group in group.
In addition an g+s bit makes sense so ls -ld shows drwxrwsr-x. (The g+s bit enforces the common group for new files.)
Best practice is to have project directories outside of /home/ - e.g. in /proj/
 
Old 03-31-2017, 12:41 PM   #5
holadebob
LQ Newbie
 
Registered: Mar 2017
Posts: 5

Original Poster
Rep: Reputation: Disabled
Hi SuicidalEggroll


bob@office ~ $ id bob
uid=1002(bob) gid=1002(bob) groups=1002(bob),1000(clark)
bob@office ~ $ ls -ld /home/bob /home/bob/Bob
drwxr-xr-x 21 bob clark 4096 Mar 31 12:29 /home/bob
drwxrwxrwx 39 bob clark 4096 Feb 26 15:04 /home/bob/Bob
bob@office ~ $

A common area for shared work is a great idea. I will look into that. Thanks...
 
Old 03-31-2017, 11:35 PM   #6
null-user
LQ Newbie
 
Registered: Mar 2017
Posts: 6

Rep: Reputation: Disabled
Hi-Ya holadebob

suicidaleggroll is right, it's not a good idea for users to go into each others home directories to read/write stuff. Instead create shared folder(s) for others to collaborate like adding, modifying the contents of the shared folders.

This is easily done by the traditional permission scheme of groups, folder and group ownership and directory permissions.

There is also another method of doing this called ACL Access control List. A more fine tune type of permissions scheme.

Here is a short ten minute youtube video on ACL usage.

https://www.youtube.com/watch?v=6piQXXHTmqk

It's very simple to do.

Last edited by null-user; 04-01-2017 at 02:33 AM.
 
  


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
Granted 777 Permissions to all files under / superviks Linux - Server 5 05-21-2015 07:56 AM
Using 777 default permissions for Files? rhel5 Red Hat 2 04-24-2009 09:58 AM
different users can all access file system and copy/paste? mhg Linux - Newbie 3 10-28-2008 09:40 PM
vfat parition cannot set the files premission to 777. hocheetiong Linux - Newbie 2 09-24-2007 01:14 AM
How to set folder permissions to allow 777 for all files s0n|k Linux - Newbie 3 11-08-2006 09:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:05 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