LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 12-05-2017, 04:06 AM   #1
yod
LQ Newbie
 
Registered: Aug 2017
Posts: 15

Rep: Reputation: Disabled
Group permissions


Hi guys, if I create a directory and assign to it an owner and a group, both the owner and the group have the permissions rwx, as you can see:
https://image.ibb.co/etd1pb/dj.png
When I add the same group ("sharex") to another user, for example mavetek2, why I get permission denied when I try to write inside that directory?
 
Old 12-05-2017, 05:36 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 8,696

Rep: Reputation: 886Reputation: 886Reputation: 886Reputation: 886Reputation: 886Reputation: 886Reputation: 886
There's a thing called a umask, which sets default permissions when creating files. The usual umask gives 0644 for files (owner only can write) and 0755 for directories. Try setting the directory to 0775, and the group to 0664, and see if you can write then.

Note that this is insecure and as gift to snoopers and hackers.
 
1 members found this post helpful.
Old 12-05-2017, 10:49 AM   #3
yod
LQ Newbie
 
Registered: Aug 2017
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by business_kid View Post
There's a thing called a umask, which sets default permissions when creating files. The usual umask gives 0644 for files (owner only can write) and 0755 for directories. Try setting the directory to 0775, and the group to 0664, and see if you can write then.

Note that this is insecure and as gift to snoopers and hackers.
After a reboot it worked, but i didn't know umask so its all good, thank you for your helping
 
Old 12-08-2017, 04:20 PM   #4
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,714

Rep: Reputation: 1280Reputation: 1280Reputation: 1280Reputation: 1280Reputation: 1280Reputation: 1280Reputation: 1280Reputation: 1280Reputation: 1280
Quote:
Originally Posted by yod View Post
After a reboot it worked, but i didn't know umask so its all good, thank you for your helping
Note: if you added the user to the group, that user must logout and login again before that group is active for the process started as that user will have access.

A reboot forces a logout and login... so that would explain why it worked after a reboot.
 
1 members found this post helpful.
  


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
setfacl changes group permissions; giving another user rw permissions secretlydead Linux - Server 4 09-23-2012 12:12 AM
Group permissions: user can't access 770 directory even though a member of group jm34003 Linux - Security 13 05-16-2012 03:03 PM
Member of group root, but root group permissions don't apply? aeternitas Linux - Software 7 04-22-2010 12:06 AM
Secondary group users need to change the file permissions of primary group files? sunnybmv Linux - Newbie 3 12-10-2009 05:57 PM
permissions not recognizing group or assigned users to group blckspder Linux - Server 1 07-28-2008 11:32 AM

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

All times are GMT -5. The time now is 12:56 PM.

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