Re: chmod every file to 777



michiedo@xxxxxxxx wrote:
I've put a blank in the wrong place ...while issuing

sudo chmod -R 777 /opt/somedir...and then something awful, that i dont
write here because it could be mis-interpreted as a malicous command

the result is that now each and every file in my system has permission
777
lovely i would say
:-(((

i've fixed the /etc/sudoers permissions back to 440 ....

the best thing i can imagine for now is "chmod" every system folder to
more restrictive permissions: very annoying, to say the least.
Or maybe: save my foders and reinstall (i would HATE it);
or, probably better restore the backup of may partition, it' one week
old.
It could be a choice, but i'll be grateful for every suggestion...
some clever shell script ....

Thank you in advance

If you have a backup, even an older one, you may be able to use it's permissions, i.e. list the archive content, extract fthe names of the files and their permissions and to the chmod with this.

Depending on which installation method is used with this bmachine, the package management may have the ability to check desired permissions. As far as I remember the SysV pkg tools can do this and I think Linux' rpm can do it too.

Bye, Jojo

.



Relevant Pages

  • Re: File and Folder permissions..
    ... Do not set fixed permissions that may be wrong, use chmod g+w to add write access for the group. ... Backup,,, A cronjob that change ctime every hour will tag all files as candidates for incremental backup, only change the files that need to be changed. ... A file has one owner, and if someone need to change it, just make a copy and change the copy, so your wife now are the owner of her version. ...
    (alt.os.linux.suse)
  • Re: apache permission problem please help
    ... Ok as anyone reading this thread knows i have huge mess on hands. ... chmod -R 701 home ... mailclients but i moved one and had to modify the permissions all over ... >>apache was unable to use these files. ...
    (freebsd-questions)
  • Re: setting file permissions on a web server
    ... If permissions are kept intact you can ... you transfer first and chmod on the server. ... Since I'm running Windows, I assume that I can't run the chmod line on my own computer. ... My web server uses Unix, but is it possible for me to have access to a command line for the server? ...
    (comp.lang.python)
  • Re: Safe Mode & File Upload
    ... with permissions 0755 and I can create files with a Script owned by the ... SafeMode says, that the directory belongs to the PHP-Interpreter. ... I know that chmod() doesn't change the owner, ...
    (comp.lang.php)
  • Re: Lose execute privileges on owner files?
    ... I have a bash shell script that I chmod to 777. ... What are the permissions of the parent directory? ... alarm in some manner (send you mail, write to file - I'd have it include ...
    (comp.os.linux)