The command is as follows:
chmod -R 777 文件名
Parameter -R
means recursion, 777 means opening all permissions.
For example:
chmod 777 test.sh
Related learning video tutorial sharing: linux video tutorial
Supplement:
If you can add it to everyone Execution permission:
chmod a+x 文件名
If you add executable permission to the file owner:
chmod u+x 文件名
If you add executable permission to the group:
chmod g+x 文件名
If you give it to someone outside the group Add executable permissions:
chmod o+x 文件名
Recommended related articles and tutorials: linux tutorial
The above is the detailed content of How to add permissions to files in linux. For more information, please follow other related articles on the PHP Chinese website!