Give write access chmod
If this is off, you cannot read the file.
Chmod permissions table
Show permissions for the named directory ies ls -al dir Absolute modes are octal numbers specifying the complete list of attributes for the files; you specify attributes by ORing together these bits. Shotts, Jr. Verbatim copying and distribution of this entire article is permitted in any medium, provided this copyright notice is preserved. You can specify multiple symbolic names if you separate them with commas. To find out the mode of a directory: ls -dl dir Generally not a desirable setting. This command will produce a message similar to the following: -rwxr-x--x 1 owner group Jul 14 filename The string of 10 characters on the left shows the mode. Generally not a good setting. It is possible to use these features on directories of all levels and all files within those directories, individually or as a group. The output will look something like: drwx fred Jul 11 In shell scripts, these bits are ignored.
To exit the superuser session, type exit and you will return to your previous session. Thus, this output shows the permissions for the current directory and its parent. Absolute form The other way to use the chmod command is the absolute form, in which you specify a set of three numbers that together determine all the access classes and types.
Changing Group Ownership The group ownership of a file or directory may be changed with chgrp. For more about umask, enter man umask An Example - Fred and Joe Want to Share Files There may be times that you want to copy a file from someone else's directory. Note: This assumes that everyone already has access to the directory where myfile is located and its parent directories; that is, you must set the directory permissions separately. Generally not a desirable setting. The two one bits prevent "group" and "other" write permission. Once Joe has copied the files, Fred will probably want to change the mode of his home directory so that it is no longer accessible to the world at large. The character 'd' means it is a directory. This setting is common for programs that are used by all users. Umask is a 3 digit octal number. Again, we can use the octal notation to set permissions, but the meaning of the r, w, and x attributes is different: r - Allows the contents of the directory to be listed if the x attribute is also set.
The permission part of a symbolic mode is any combination of the following: r Read permission. To find out the mode of a directory: ls -dl dir All others may list the directory, but cannot create files nor delete them.
Shotts, Jr. The following scenario describes the process. So, a newly created file will have rwx permission for the owner, and rx permission for group and others.
This setting is common for programs that are used by all users. For more about umask, enter man umask An Example - Fred and Joe Want to Share Files There may be times that you want to copy a file from someone else's directory.
based on 45 review