Tag Info

New answers tagged


The permissions you got were the permissions you asked for. The 't' comes from the '1' in the '1775' permissions string you specified, and sets what is called the "sticky bit". This tells the system that files in that directory can only be renamed or removed by the file's owner, the directory's owner, or the root user. The get the permissions you wanted ...


Here's an answer to question Y (ignoring question X), inspired by the OP's attempt: #!/bin/sh while read ls_out do extra=0 perms=0 for i in {1..9} do # Shift $perms to the left one bit, so we can always just add the LSB. let $((perms*=2)) this_char=${ls_out:i:1} ...


Here is a one liner I wrote the other day for very similiar purpose. Assuming you understand chown/chmod ,So can adapt for your purposes. In this case, some user accounts are nested under the userX account. The problem was files uploaded by those users were still owned by otheruser:otheruser, So userX could not affect them, This script runs every minute to ...


You can use find for that: find / -type d -group web -exec chmod g+rx {} + This is slightly inefficient as it will also set group to rw for those that already have those set. You can also have find check on some of the permission bits with -perm /mode and negate that match.


Even assuming you meant chmod g=u rather than chmod 770, it may well break some of the PAM security modules, including those that manage logins. It will break ssh logins, as ssh checks permissions on $HOME and all parent directories. If, as you suggest in your comments, you simply want to avoid using sudo there are some options that spring to mind: Login ...


When you try to use chmod to set the link's permissions, the actually you do is to set the permissions of the link's target.The link's permissions are meaningless.


Run the following to reclaim the directory (immediately and on subsequent boots): service='reclaim-postgresql' service_file="/etc/init.d/${service}" echo "#!/bin/sh set -e ### BEGIN INIT INFO # Provides: ${service} # Required-Start: \$postgres-xc # Required-Stop: \$postgres-xc # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # ...

Top 50 recent answers are included