Re: Ubuntu (Linux) Chmod using octal notation
Your syntax is correct assuming you were in the directory (with typical rwx permission for you or your group) containing testfile. If it was not successful or the file did not exist, you should have gotten an error from chmod.
Were you doing this on a Linux or non-Linux file system? You cannot set permissions for individual files or directories on FAT or ntfs file systems (only blanket permissions on all directories and/or files based on mount options)
Code:
efflandt@XPS8100-1204:~$ ls -l testfile
ls: cannot access testfile: No such file or directory
efflandt@XPS8100-1204:~$ touch testfile && chmod 755 testfile
efflandt@XPS8100-1204:~$ ls -l testfile
-rwxr-xr-x 1 efflandt efflandt 0 Mar 10 23:41 testfile
chmod +x testfile would work as well, but since by default files in your home directory are owned by you and your own group, would end up with -rwxrwxr-x
i5 650 3.2 GHz upgraded to i7 870, 16 GB 1333 RAM, nvidia GTX 1060, 32" 1080p & assorted older computers
Bookmarks