Re: chmod 666 ///

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bruce Hyatt wrote:
I carelessly executed "chmod 666 ///" from a terminal as su in a user account.

--- Patrick O'Callaghan <pocallaghan@xxxxxxxxx> wrote:

Possibly all he needs to get X going is 'chmod +t /tmp'.

I tried this first and it didn't work.

On Thu, 2008-04-03 at 13:12 -0400, Andrew Parker wrote:
rpm -qa | xargs rpm ----setperms --setugids

This returned "----setperms: unknown option"
So I tried it using "--setperms" and it returned
"chmod: invalid mode string: '[various 7-digit numbers]'"
It seemed to be looping through this with different 7 digit
numbers coming back. The mode string indicates how to set the
permissions.

Here is a fixed version taken from /usr/lib/rpm/rpmpopt-4.4.2.2:

# rpm -qa --qf '[\[ -L %{FILENAMES:shescape} \] || chmod %7.7{FILEMODES:octal} %{FILENAMES:shescape}\n]' |grep -v \(none\) | grep '^. -L ' | sed 's/chmod .../chmod /' | tee /dev/tty | sh




How would chmod interpret ///? All files and directories 3
layers deep?

I'll have to see if I can get hold of a PC that I can make a
fresh install on to compare the permissions.

Thanks for the help.

Bruce


      ____________________________________________________________________________________
You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost. http://tc.deals.yahoo.com/tc/blockbuster/text5.com



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux