What is the meaning of chmod =rwx?
Meaning of chmod =rwx
Meaning of chmod =rwx
|
|
Feb 17 2017, 02:57 PM, updated 9y ago
Show posts by this member only | Post
#1
|
![]() ![]()
Junior Member
183 posts Joined: Jan 2009 |
What is the meaning of chmod =rwx?
|
|
|
|
|
|
Feb 17 2017, 03:03 PM
Show posts by this member only | Post
#2
|
![]() ![]() ![]()
Junior Member
440 posts Joined: Oct 2005 |
rwx = read write execution
chmod = change mode |
|
|
Feb 17 2017, 03:54 PM
Show posts by this member only | Post
#3
|
![]() ![]()
Junior Member
183 posts Joined: Jan 2009 |
|
|
|
Feb 17 2017, 04:01 PM
Show posts by this member only | Post
#4
|
![]()
Junior Member
37 posts Joined: Apr 2005 |
u sure u got the syntax ( chmod =rwx ) right?
refer here.... http://www.computerhope.com/unix/uchmod.htm |
|
|
Feb 17 2017, 05:27 PM
Show posts by this member only | Post
#5
|
![]() ![]()
Junior Member
183 posts Joined: Jan 2009 |
QUOTE(ultramann @ Feb 17 2017, 04:01 PM) u sure u got the syntax ( chmod =rwx ) right? Yup I'm very sure cos I have seen such syntax before. I think I found the answer here...How to Use UNIX and Linux File Permissionsrefer here.... http://www.computerhope.com/unix/uchmod.htm |
|
|
Feb 20 2017, 06:58 PM
Show posts by this member only | Post
#6
|
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
All Stars
10,429 posts Joined: Jan 2003 |
that tutorial is very well written. If you have problem understanding that then you will have problem learning linux.
Already stated: CODE Setting Permissions Without Specifying u, g, o, or a Permissions are set for user, group, and other if u, g, o, or a are not specified, but your umask (user file-creation mask) comes into play which makes things complicated. The most common umask is 022 which means that when you create a new directory the permissions are not the default of 777 ( drwxrwxrwx) but rather 777 – 022 which is 755 ( drwxr-xr-x). And when you create a new file, the permissions are not the default 666 ( -rw-rw-rw-) but rather 666 – 022 which is 644 ( -rw-r–r–). The following will happen if your umask is the most common umask of 022: Command (equivalent command using number system) Permissions chmod =rwx myfile.txt chmod 755 myfile.txt -rwxr-xr-x You need to read and understand the whole statement. It explain it very well. |
|
|
|
|
|
Feb 21 2017, 02:10 PM
Show posts by this member only | Post
#7
|
![]() ![]()
Junior Member
183 posts Joined: Jan 2009 |
QUOTE(abubin @ Feb 20 2017, 06:58 PM) that tutorial is very well written. If you have problem understanding that then you will have problem learning linux. My understanding is, if umask is 002 for regular user & chmod =rw, the permission for file would be 666 - 002 = 664 (same as default permission 666 - 002 = 664)Already stated: CODE Setting Permissions Without Specifying u, g, o, or a Permissions are set for user, group, and other if u, g, o, or a are not specified, but your umask (user file-creation mask) comes into play which makes things complicated. The most common umask is 022 which means that when you create a new directory the permissions are not the default of 777 ( drwxrwxrwx) but rather 777 – 022 which is 755 ( drwxr-xr-x). And when you create a new file, the permissions are not the default 666 ( -rw-rw-rw-) but rather 666 – 022 which is 644 ( -rw-r–r–). The following will happen if your umask is the most common umask of 022: Command (equivalent command using number system) Permissions chmod =rwx myfile.txt chmod 755 myfile.txt -rwxr-xr-x You need to read and understand the whole statement. It explain it very well. and directory also be 660 -002 =664 instead of 777 - 002=775. Correct me if I'm wrong. This post has been edited by kent05: Feb 21 2017, 06:50 PM |
|
|
Feb 21 2017, 06:36 PM
Show posts by this member only | Post
#8
|
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
All Stars
10,429 posts Joined: Jan 2003 |
yeah you got the concept right.
but your calculations is off. how can 660 -002 =664? I think it should still be 660. This post has been edited by abubin: Feb 21 2017, 06:40 PM |
|
|
Feb 21 2017, 06:52 PM
Show posts by this member only | Post
#9
|
![]() ![]()
Junior Member
183 posts Joined: Jan 2009 |
|
|
|
Aug 2 2023, 09:18 PM
Show posts by this member only | IPv6 | Post
#10
|
![]() ![]() ![]()
Validating
329 posts Joined: Jun 2023 |
It is very common also to make a file executable, like:
CODE chmod +x myapp.bin ...where myapp.bin is a binary file but not set permission to execute. |
| Change to: | 0.0174sec
0.65
5 queries
GZIP Disabled
Time is now: 25th December 2025 - 01:01 AM |