Create a file and set it's permissions to 222
In Linux the chmod command is used to set file permissions.
File permissions in Linux are not represented in binary format, but rather octal format. The first digit represents owner permissions, second digit is group permissions, and the final one is permissions for everyone. Read permissions are assigned a 4, write permissions are assigned a 2, and execute permissions are assigned a 1. A 6 permission allows read and write (4+2).
gerp
It lists the directories (folders) only in a given path, and also lists the file permissions and file sizes for those folders.
The typical way to view file permissions is to use the 'ls' command with the long listing options enabled, For example, to see the file permissions for everything in the current directory, type: ls -lsa
Anything can be made into a command on a Linux system. The steps are easy. First, using any text editor (vim, emacs, etc.) create a text file. Put anything you want to do in this file. Save the file. Make sure the file you just created has read and execute permissions (chmod). That's it! Now you have a command that you can execute in Linux.
There is generally only 1 standard command for permissions on a file or directory - chmod. You can affect permissions by other commands such as changing the ownership or group ownership of a file or directory. Other commands may be specific to different versions of Unix and Linux, so are not listed here.
If you're talking Linux, then a terminal would do you just fine. chmod is used to change file permissions. Ex: chmod 755 /filename You could probably use a file manager to do that as well. In Windows, right click and properties (there are advanced permissions as well that would only be accessible to an administrator).
You want to do that from command line? Create folder DATA with mkdir DATA. (You should have permissions to create it) If you want to create an empty file, just say touch DATA/myfile.txt Or you can use the vi editor to write to the file (vi will open the file if it exists else will create that file for you), just type vi DATA/myfile.txt You may need to learn some vi keys before you try that. On Linux, try vimtutor! And just in case you think it is boring to type DATA/something... do CD DATA after creating the directory (folder) . Enjoy :)
Each file and directory can be marked read-only, writable, and executable. Each file / directory will contain three sets of permissions that can be marked as such, namely the owner, other users in the owners group, and users not in the group.
The chmod command. For it's usage, consult it's manual page with the... $ man chmod command....
Set access permissions for shared folders Create shared folders View file and folder permissions