Home  >  Service  >  Class support  >  My web page(Home page)  >  Change of access right

Change of access right

 2020/06/01

When you want to change of access right from UNIX, there are two methods.

One is relative method that is using characters and specify, and one is absolute method that is using numbers and specify.

When you change of access right, please choose one of method before use.

Example : Change of "public_html folders" access right in the "MyVolume" from rwxr--r-- (744) to rwxr-xr-x (755) using "chmod" command.

 

Owner Group Other  
Read Write Execute Read Write Execute Read Write Execute  
× × × × rwxr--r--(744)
× × rwxr-xr-x(755)

 

 

Relative method

 

Relative method uses characters to specify. Change right with combining u(Owner),g(Group),o(Other),a(All), r(Read),w(Write),x(Execute), and +(ON),-(OFF).
When you change only a part of right (Permission), this method is very useful.

 

Check the access right with the directory (file) that you want change using "ls -l" command, with login state in UNIX.
In this example, the access right of target folder (public_html) is rwxr--r--(744).

Typing "chmod go+x public_html" in back of prompt, then execute pushing "Enter" Key.

 

Then, checking the access right is rwxr--r--(755) or not, on the target folder(public_html) using "ls -l" command. 

 

 

 

Absolute method

 

Absolute method uses numbers to specify. Add the attribute (numbers) you want the file / directory to have the attribute. 

This time, suppose you want to change Owner can read / write / execute and group / others can read / write only.

If you want to do that, typing "755" (because 400+200+100+40+10+4+1) from reference to the below table.

Owner 400
200
100
Owner can read
Owner can write
Owner can execute
Group 40
20
10
User who belong the group can read
User who belong the group can write
User who belong the group can execute
Other 4
2
1
Other user can read
Other user can write
Other user can execute

 

Check the access right with the directory (file) that you want change using "ls -l" command, with login state in UNIX.
In this example, the access right of target folder (public_html) is rwxr--r--(744).

This time, change the execute right of group / others from OFF to ON.

Typing "chmod 755 public_html" in back of prompt, then execute pushing "Enter" Key.

 

 

Then, checking the access right is rwxr--r--(755) or not, on the target folder(public_html) using "ls -l" command.