Score:0

How to make other users have read access on a folder in my home?

sn flag

My server is ubuntu22.04 and AppArmor is enabled. I want to share my folders (/home/syang/public) with other users. I give the read permission by chmod -R go+rX /home/syang/public, but they still cannot access this folder. It seems to be a problem caused by AppArmor. How can I add a file for AppArmor to allow others to access this folder and read files inside?

Here is the output:

ls -ld /home/syang /home/syang/public

drwxr-x--- 62 syang syang 4096 Jun 27 17:00 /home/syang
drwxrwxr-x  2 syang syang 4096 Jun 27 16:28 /home/syang/public
Bodo avatar
pt flag
Please [edit] your question and copy&paste the output of `ls -ld /home/syang /home/syang/public`.
syang avatar
sn flag
Hi, I have edited my question and pasted the output. Does it help?
Esther avatar
es flag
https://unix.stackexchange.com/questions/437162/how-to-give-permissions-to-a-subfolder-while-denying-access-to-folders-above-it
Esther avatar
es flag
in short: you need +x on the parent directory (/home/syang), otherwise other users can't see anything in it.
syang avatar
sn flag
Thanks! it helps!
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.