LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-06-2016, 06:55 PM   #61
ParanoiaUser
Member
 
Registered: Jun 2013
Posts: 40

Original Poster
Rep: Reputation: Disabled

Quote:
Originally Posted by szboardstretcher View Post
Your users are made incorrectly. lets delete them, and start with two new ones.

Code:
# Get rid of your broken users and groups
userdel user1
userdel user2
groupdel user1
groupdel user2

# Create new users and a COMMON group
adduser user1
adduser user2
groupadd COMMON

# Add users to the COMMON group
usermod -g COMMON user1
usermod -g COMMON user2
chown -R user1:COMMON /home/user1

# make sure sftpd config has this in it
local_umask=0002
file_open_mode=0777

# make sure schroot.conf has this in it
groups=COMMON
at that point you will probably want to reboot, since some of the services running might not update their configuration.
This looks interesting, any way i can actually do this without deleting the users ? any way i can just modify them ?
 
Old 12-06-2016, 07:11 PM   #62
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Code:
# remove users from eachothers groups
gpasswd -d user1 user2
gpasswd -d user2 user1

# Create new COMMON group
groupadd COMMON

# Add users to the COMMON group
usermod -g COMMON user1
usermod -g COMMON user2
chown -R user1:COMMON /home/user1

# make sure sftpd config has this in it
local_umask=0002
file_open_mode=0777

# make sure schroot.conf has this in it
groups=COMMON
 
Old 12-06-2016, 08:40 PM   #63
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
Since you really don't care about permission all that much, why not make one user account that both users use to login then all your problems are solved.

People here are trying to teach you something but you are really unwilling to learn. If you plan on maintaining a linux system you really need to get on the ball and stop asking people to take your hand and give your every command you need to type in because one day someone is going to give you sudo rm -rf / and if you don't know what it does you will learn very quickly.
 
2 members found this post helpful.
Old 12-07-2016, 04:04 AM   #64
ParanoiaUser
Member
 
Registered: Jun 2013
Posts: 40

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by szboardstretcher View Post
Code:
# remove users from eachothers groups
gpasswd -d user1 user2
gpasswd -d user2 user1

# Create new COMMON group
groupadd COMMON

# Add users to the COMMON group
usermod -g COMMON user1
usermod -g COMMON user2
chown -R user1:COMMON /home/user1

# make sure sftpd config has this in it
local_umask=0002
file_open_mode=0777

# make sure schroot.conf has this in it
groups=COMMON
I will experiment with these "soon", not sure how soon soon is.
 
Old 12-07-2016, 09:43 AM   #65
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by ParanoiaUser View Post
I will experiment with these "soon", not sure how soon soon is.
Code:
usermod -G
that is a hint

Last edited by BW-userx; 12-07-2016 at 09:47 AM.
 
Old 12-07-2016, 10:13 AM   #66
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
I was setting COMMON as the primary group between them, so folders/files were created with COMMON as the group.

-G is supplemental and non-primary groups.
 
Old 12-07-2016, 10:19 AM   #67
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by szboardstretcher View Post
-G is supplemental and non-primary groups.
it was to knock off all of the extra none needed groups that he may have added to his users. it was only a hint.

Code:
-g (primary group assigned to the users)
-G (Other groups the user belongs to)
 
Old 12-08-2016, 12:44 AM   #68
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Angry

Put in a lot of effort to get zero posts tagged as helpful

 
Old 12-08-2016, 04:54 AM   #69
Jjanel
Member
 
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
Blog Entries: 12

Rep: Reputation: 364Reputation: 364Reputation: 364Reputation: 364
Thumbs down Q: HowTo chmod 666 sshftp umask, in 666 hard steps? A: C:\rm-rf/

BW got some +1s. Where's TB0 1 when we NEED 'em? Gave RateThr. *a* star .>.

Last edited by Jjanel; 12-08-2016 at 02:39 PM.
 
Old 12-08-2016, 05:37 AM   #70
ParanoiaUser
Member
 
Registered: Jun 2013
Posts: 40

Original Poster
Rep: Reputation: Disabled
I still didnt test the latest stuff.
 
  


Reply



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
changing the default permission for both directory and files to 775 with umask fermat97 Linux - Newbie 1 11-14-2014 07:02 AM
New user group permission to only three folders without being owner zilexa Linux - Newbie 8 07-09-2014 11:57 PM
Can you make any files and folders created within a directory owned by another user?? helptonewbie Linux - Newbie 13 12-14-2007 04:21 PM
Samba can create new files and folders but access denied in any new folders k.king Linux - Networking 2 01-15-2006 06:14 AM
permission 775 to all folders and sub... amer_58 Linux - Newbie 3 04-23-2005 04:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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