New answers tagged

3

That would be 476. A good way to remember is that read has the value of 4, write has the value of 2, and execute has the value of 1. Also, the first number is dedicated to owner, the second number to group, and the third one to other. owner group other Read 4 4 4 Write 2 2 2 Execute 1 1 1 You add the numbers together, ...


0

Either read in the "Explanation" field in the table below what you want to do, or do ls -l and see what it means. Each object (file, directory, sockets, device, etc) has 10 positions to indicate what's possible with the object. For example you could see -rwxr-x---. You can split the 10 positions up into these parts: The 1st character: what kind of object is ...


0

You can do so with ACLs(Access control lists). This is a great article you want to have a look at; ACL tutorial


0

What about aliases? Typing alias at the command line you will see all defined aliases. I'd suggest adding something like: alias rm='rm -i' Define it in ~/.bashrc, (so you can remove it in future or change it to suit your needs.) [mal@localhost ~]$ touch 123 [mal@localhost ~]$ rm 123 [mal@localhost ~]$ touch 123 [mal@localhost ~]$ rm -i 123 rm: remove ...


1

If you remove the 'w' bit, you can't accidentally overwrite whatever you removed the 'w' bit from. If that's a directory, that means you can't add or remove files from that directory; if that's a file, that means you can't change the file. Downside of that method, however, is that you lose data (IMO, file permissions are part of your backup data). An ...


2

It would generally avoid all the sudo and deliberately inhibiting yourself access to your files - it will likely cause you problems and possibly be so annoying you will just override your own protection mechanisms anyway. I would instead use trash-cli which behaves like a desktop type trashcan where you can recover your file later if you make a mistake. ...


0

Changing directories' permissions to 555 (or 550, or 500...) will prevent you from deleting or creating files inside them. Changing files' permissions to 444 will prevent you from modifying them. (You really need to combine both operations, since many editors will create a new file when "modifying" an existing one, which effectively means that you can end up ...


0

Octal numbers and permissions You can use octal number to represent mode/permission: r: 4 w: 2 x: 1 For example, for file owner you can use octal mode as follows. Read, write and execute (full) permission on a file in octal is 0+r+w+x = 0+4+2+1 = 7 Only Read and write permission on a file in octal is 0+r+w+x = 0+4+2+0 = 6 Only read and execute ...


1

It looks like your script file has DOS/Windows line endings, e.g. Carriage Return (^M, chr(13)) in addition to the Line Feed character. The output tester[2]: ^M: cannot execute [Permission denied] certainly looks like that. This would also explain why the file cannot be executed by the shell directly: It is looking for an executable named /bin/ksh^M ...


0

chmod 600 ~/.ssh/id_rsa; chmod 600 ~/.ssh/id_rsa.pub (i.e. chmod u=rw,go= ~/.ssh/id_rsa ~/.ssh/id_rsa.pub) are correct. chmod 644 ~/.ssh/id_rsa.pub (i.e. chmod a=r,u+w ~/.ssh/id_rsa.pub) would also be correct, but chmod 644 ~/.ssh/id_rsa (i.e. chmod a=r,u+w ~/.ssh/id_rsa) would not be. Your public key can be public, what matters is that your private key is ...


-1

Use command newgrp to switch to apache's supplementary group updaters.


2

Being unable to change permissions as root on a built-in application or system file on OS X is indicative of System Integrity Protection, a new security feature added in 10.11, which restricts the root account and limits the actions that the root user can perform on protected parts of OS X. Protected parts include /System and pre-installed ...


-2

You should be able to achieve your desired results as the root user on Mac OS X prior to 10.11 "El Capitan". "The user account named "root" is a special user in UNIX-style operating systems that has read and write privileges to all areas of the file system." If you have not already enabled the root user, here are the instructions on how to enable ...



Top 50 recent answers are included