Tag Info

New answers tagged

2

You'll find that the partition is mounted from a NAS device of some sort that doesn't implement POSIX permissions, or that has been configured to ignore the permissions change. You can see that it's not a local filesystem by looking at the output of df -h index.html


5

Use attributes: chattr -R +i files (as root) will add the +i attribute recursively to your folders and files which will prevent ANY alternations. Note that root will also be locked and you would need to unset the i manually every time. Ownership and alike will be left unchanged.


-1

First change user and group to root chown -R root:root /tmp/uploads then change permissions so that only root can write chmod -R 755 /tmp/uploads EDIT: If you only need to restore files owners, I would save your files and owner in a file (There sure are better ways to do this, but this is the first thing that comes to my mind). Be sure ...


2

Not sure what you mean by "a directory and its users inside". The root user can always write to any file, so to make a file or directory writable only to root you make it non-writable by user, group, and others. Note that the webroot dir is supposed to be writable by the apache user, so what you're trying to do is to give it the incorrect permissions. ...


2

try as root find wherever -type d -name ... -exec chown Me {} \; where -type d apply to dir only -name ... your regexp -exec chown Me {} \; use chown on find dir. you must be root to chown.


4

I may have misunderstood. But you can recursively use chmod and chown eg. chown -R username:username /path/directory To recursively apply permission 700 you can use: chmod -r 700 /path/directory Of course the above is for Linux so not sure if mac osx is the same. EDIT: Yea sorry forgot to mention you need to be root to chown something, I just assumed ...


5

Obviously not all combinations are that useful, but to take the one you mentioned specifically... You actually don't need read permission to execute a file -- only execute permission -- unless the file in question is a script (e.g. a shell-script (.sh), perl-script (.pl) and so on). Normal binaries can be executed with just the execute permission. On ...


15

it make sense for directories, for example if you keep (secret) executables in a specific directory and then allow users call those files without being able to see the directory content (but knowing that a specific file is there after you informed them!). 333 compared to 111 allows writing/deleting files to/from those directories without being able to see ...


21

I played with it and apparently, exec permissions do not imply read permissions. Binaries can be executable without being readable: $ echo 'int main(){ puts("hello world"); }' > hw.c $ make hw $ ./hw hello world $ chmod 111 hw $ ./hw hello world $ cat hw /bin/cat: hw: Permission denied I can't execute scripts though, unless they have both read and ...


4

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 ...



Top 50 recent answers are included