Score:0

If i create a folder in a folder, the execute bit permission not included, so i should set it manually in order to access it

ma flag

i got a problem these days, i have a server, when i make a subfolder inside of a specific folder "the name of the folder is: "AFORWARD", for example i make "GG" inside the "AFORWARD", any folder i make inside the "AFORWARD" they become inaccessible, meaning that i can't get into them, and when i tried to see the permissions set for the subdirectory, looks like there is no execute bit included by default, but when i do this on other directories, i get the execute bit permission included by default on the folder, so, i did :


ls -l -d ./AFORWARD

output:

drwxrwxr-x+ 9 admin admin 4096 Oct 16 01:19 ./AFORWARD


ls -l -d ./AFORWARD/GG

output:

drw-rwxr--+ 2 admin admin 4096 Oct 16 01:31 ./AFORWARD/GG

i think everything seems okay with the folder, but maybe i don't know, or something messed up, i know it can be fixed by using a simple chmod command and give the folder needed permissions, but the problem is, i need the permissions set by default once the folder is created, the issue is with the java, our server program runs on java, java creates files, folders, reads them, and do many other things with them, it can't access the created folders, which they don't have execute bit permission included by default. once it can't, it fails, and the server crashes.

HuHa avatar
es flag
Check your umask. Does it explicitly take away the execute permission? It shouldn't. Use `022` or `002`.
HuHa avatar
es flag
Also, the `+` at the end of the `ls` output indicates ACLs; that might also be a problem.
hr flag
It looks like you have ACLs in effect on the directories in question - see for example [Why does ls show wrong permissions for the group when using ACL?](https://askubuntu.com/questions/964783/why-does-ls-show-wrong-permissions-for-the-group-when-using-acl)
alireza mirmohamad avatar
ma flag
@HuHa its on 0002, its same on all, even the AFORWARD, with the umask of 0002 on other folders, i don't get this issue.
alireza mirmohamad avatar
ma flag
@steeldriver how can i get rid of it? show me a fix, a solution, thank you, i hope if u give me an example
hr flag
@alirezamirmohamad tbh I don't use ACLs so I'm not the best person to answer this. As well, you should understand **why** your system uses ACLs before just getting rid of them.
Score:0
ma flag

Removed ACL from the directory and its sub directories, and that helps, pretty much it.

setfacl -b -R ./AFORWARD
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.