coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Some Suggestions on 'chmod' command


From: 2477441814
Subject: Some Suggestions on 'chmod' command
Date: Mon, 26 Aug 2019 11:06:51 +0800

Dear team,


when using chmod command with '-R' option to set permissions on a directory and 
files under the directory, I found that if my changed permissions cause the 
current user to lose 'r' or 'x' permissions, then an error will be reported 
during execution, resulting in only permission modification to the directory.


The following are my suggestions:

If the user only wants to modify the permissions of the directory, he should 
not consider using the '-R' option.

If the user wants to modify the permissions of the directory and all files 
under the directory, he should consider using the '-R' option and cannot let 
the current user lose the 'r' and 'x' permissions, otherwise even the 
permissions of the directory cannot be changed (the current behavior is to 
modify at least the permissions of the directory).

If the user only wants to modify the permissions of all files under the 
directory (excluding the directory), a command like 'chmod u+x ./target_dir/*' 
may be more appropriate.



I hope you can consider my suggestion.


Best wishes,
YuLiang Liu

reply via email to

[Prev in Thread] Current Thread [Next in Thread]