Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 700  / 2 Years ago, fri, april 22, 2022, 11:17:19

I have a folder under the /etc directory.
This folder and files contained in it has to be accessed by every user beloning to myGroup group.
I correctly set permissions: every file in this directory gives me, after



ls -l



my file owner myGroup




this goes for every subfolder (I manually set this for each file/folder).



Anyway, if I type



cat /etc/myFolder/example.txt


It tells me that I don't have anough permissions.
I think this is due to the fact that /etc folder belongs to the root. But I don't want to change group to the /etc folder too! And I need that folder to stay there!



How to solve this problem?



edit:
output of



ls -ld /etc/myFolder/ /etc/myFolder/example.txt


gives me




drwxr-xr-x 2 root myGroup 4096 feb 26 12:10 /etc/myFolder/



-r-------- 1 root myGroup 1204 feb 26 12:10 /etc/myFolder/example.txt



More From » permissions

 Answers
2

Try :



sudo chown owner:group /etc/myFolder/ -R 


change owner to your user and the group belong to it



sudo chmod 775 /etc/myFolder/ -R


This shold give owner and group rwx permissions.



Note : you can change the permission as it fits your needs .


[#26792] Sunday, April 24, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ateact

Total Points: 176
Total Questions: 130
Total Answers: 122

Location: Egypt
Member since Sun, Apr 23, 2023
1 Year ago
;