Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to view and modify file permissions under Linux

Shulou Source: shulou.com Published: 2022-06-01 17:30:40 10月12日 Update

This article mainly explains "how to view file permissions and modify file permissions under Linux". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn how to view file permissions and modify file permissions under Linux.

View permissions command

You can use the command ls-lD to view the directory, or use ls-la directly

Such as

Ls-l www.yisu.com / / here means to view the www.yisu.com directory

Modify permission command

Chmod 777 filename

1.chmod 577 / home/stuser-R

2.umask-p 0200

3.chown XXXX YYYY (XXXX is the user name YYYY is the file name)

Permission list

-rw- (600) only the owner has read and write permission

-rw-r--r-- (644) only the owner has read and write access, and groups and others only have read permission

-rwx- (700) only the owner has the permission to read, write and execute

-rwxr-xr-x (755) only the owner has read, write, and execute permissions, and groups and others only have read and execute permissions

-rwx--x--x (711) only the owner has the permission to read, write, and execute, and groups and others only have the permission to execute

-rw-rw-rw- (666) everyone has read and write access

-rwxrwxrwx (777) everyone has access to read, write and execute

At this point, I believe you have a deeper understanding of "how to view file permissions and modify file permissions under Linux". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Permissions files only owner command content file name directory learning practical deeper interest practical practical easy to operate method more friends users user names Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Linux Shulou Tech Info OPPO Reno Microsoft