FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 04-03-2008, 05:07 PM
Bruce Hyatt
 
Default chmod 666 ///

I carelessly executed "chmod 666 ///" from a terminal as su in a
user account. It caused various problems because of permissions,
of course.

I rebooted, logged into root and executed "chmod 777 ///" which
enabled me to log into my account but when I tried to start
xwindows I wound up with a blank screen. Same thing with root
account.

Anyone know what I can do to get back to "normal?"

Thanks in advance,
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

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 04-03-2008, 05:12 PM
"Andrew Parker"
 
Default chmod 666 ///

On Thu, Apr 3, 2008 at 1:07 PM, Bruce Hyatt <brucejhyatt@yahoo.com> wrote:
> I carelessly executed "chmod 666 ///" from a terminal as su in a
> user account. It caused various problems because of permissions,
> of course.
>
> I rebooted, logged into root and executed "chmod 777 ///" which
> enabled me to log into my account but when I tried to start
> xwindows I wound up with a blank screen. Same thing with root
> account.
>
> Anyone know what I can do to get back to "normal?"

Can't say I've tried it on every rpmm, but this may get some things
back to normal:

rpm -qa | xargs rpm ----setperms --setugids

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 04-03-2008, 05:23 PM
"Jacques B."
 
Default chmod 666 ///

On Thu, Apr 3, 2008 at 1:07 PM, Bruce Hyatt <brucejhyatt@yahoo.com> wrote:
> I carelessly executed "chmod 666 ///" from a terminal as su in a
> user account. It caused various problems because of permissions,
> of course.
>
> I rebooted, logged into root and executed "chmod 777 ///" which
> enabled me to log into my account but when I tried to start
> xwindows I wound up with a blank screen. Same thing with root
> account.
>
> Anyone know what I can do to get back to "normal?"
>
> Thanks in advance,
> Bruce
>
I had to deal with a similar scenario where ownership was changed with
-R. Fortunately I used an identical system (benefits of a classroom
environment) to create a baseline file containing the list of files on
the system and their ownersand groups. Pumped that through a simple
script and restored ownership on all the files. You could do
something similar with permissions if you had a baseline system.

But Andrew's suggestion sounds easier if that will work.

Jacques B.

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 04-03-2008, 06:10 PM
"Jacques B."
 
Default chmod 666 ///

> I had to deal with a similar scenario where ownership was changed with
> -R. Fortunately I used an identical system (benefits of a classroom
> environment) to create a baseline file containing the list of files on
> the system and their ownersand groups. Pumped that through a simple
> script and restored ownership on all the files. You could do
> something similar with permissions if you had a baseline system.
>
> But Andrew's suggestion sounds easier if that will work.
>
> Jacques B.
>

A quick test and I have the following suggestion if you can't find any
other suitable one. Run the following find command (as root)on your
system folders (i.e. /etc, /boot, /bin, /var).

find /etc -printf "%h/%f*%m
" >/path-to-removable-drive/etc_files.txt
2>/dev/null

Note the asterisk (*) after the %f. This is used by the awk command
as a field delimiter later on in the script. I used * because it
could not be part of a file name so perfect for this scenario.

Repeat the above for other folders (changing the /etc to the
appropriate path, and the file name etc_files.txt to appropriate
name).

Take that thumb drive over to your messed up system and run the
following script from the thumb drive where the text files are located
(makes it easier). Save the script as changeperms.sh. Run it as:
./changeperms.sh etc_files.txt
Repeat for each of the files you created.

#!/bin/bash
for i in $(cat %1)
do
tpermissions=`echo $i | awk -F* '{print $2}'`
tfile=`echo $i | awk -F* '{print $1}'`
echo "Changing file permissions on $tfile to $tpermissions"
chmod $tpermissions $tfile && echo "changed..." || echo "did not change!!!"
echo "-----------------------------------------------------------------------------------------"
done


Jacques B.

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 04-03-2008, 06:54 PM
"Patrick O'Callaghan"
 
Default chmod 666 ///

On Thu, 2008-04-03 at 13:12 -0400, Andrew Parker wrote:
> On Thu, Apr 3, 2008 at 1:07 PM, Bruce Hyatt <brucejhyatt@yahoo.com> wrote:
> > I carelessly executed "chmod 666 ///" from a terminal as su in a
> > user account. It caused various problems because of permissions,
> > of course.
> >
> > I rebooted, logged into root and executed "chmod 777 ///" which
> > enabled me to log into my account but when I tried to start
> > xwindows I wound up with a blank screen. Same thing with root
> > account.
> >
> > Anyone know what I can do to get back to "normal?"
>
> Can't say I've tried it on every rpmm, but this may get some things
> back to normal:
>
> rpm -qa | xargs rpm ----setperms --setugids

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

poc

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 04-04-2008, 03:27 PM
Bruce Hyatt
 
Default chmod 666 ///

> > I carelessly executed "chmod 666 ///" from a terminal as su
> > in a user account.

--- Patrick O'Callaghan <pocallaghan@gmail.com> 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.

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

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 04-04-2008, 07:03 PM
"Patrick O'Callaghan"
 
Default chmod 666 ///

On Fri, 2008-04-04 at 08:27 -0700, Bruce Hyatt wrote:
> > > I carelessly executed "chmod 666 ///" from a terminal as su
> > > in a user account.
>
> --- Patrick O'Callaghan <pocallaghan@gmail.com> 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.
>
> How would chmod interpret ///? All files and directories 3
> layers deep?

In a Unix (and Linux) pathname any sequence of one or more / characters
collapses into a single /.

Thus /// is exactly the same as / so your chmod affects only files in
the root directory (and not those beneath it). Which is why I
thought /tmp might the cause of the problem.

poc

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 04-04-2008, 08:48 PM
Bruce Hyatt
 
Default chmod 666 ///

--- Patrick O'Callaghan <pocallaghan@gmail.com> wrote:
>
> In a Unix (and Linux) pathname any sequence of one or more /
> characters
> collapses into a single /.
>
> Thus /// is exactly the same as / so your chmod affects only
> files in
> the root directory (and not those beneath it). Which is why I
> thought /tmp might the cause of the problem.

In that case, it seems odd to me that executing "chmod 777 ///"
didn't allow me to startx.

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

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 04-04-2008, 08:55 PM
"Jacques B."
 
Default chmod 666 ///

>
> In that case, it seems odd to me that executing "chmod 777 ///"
> didn't allow me to startx.
>
>
> Bruce

Run the following command:

Find / -perm 666

in order to find all files that have permissions set to 666. At least
you'll know that only those were potentially changed by you (some may
have been already set at that).

Jacques B

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 04-04-2008, 11:23 PM
"Patrick O'Callaghan"
 
Default chmod 666 ///

On Fri, 2008-04-04 at 13:48 -0700, Bruce Hyatt wrote:
> --- Patrick O'Callaghan <pocallaghan@gmail.com> wrote:
> >
> > In a Unix (and Linux) pathname any sequence of one or more /
> > characters
> > collapses into a single /.
> >
> > Thus /// is exactly the same as / so your chmod affects only
> > files in
> > the root directory (and not those beneath it). Which is why I
> > thought /tmp might the cause of the problem.
>
> In that case, it seems odd to me that executing "chmod 777 ///"
> didn't allow me to startx.

Well, it seemed odd to me, which is why I suggested looking at /tmp, but
that's definitely the meaning of ///. Try this to demonstrate:

ls -l ///////////////////////tmp

Are you sure it wasn't 'chmod -R 666 ///'?

poc

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 

Thread Tools




All times are GMT. The time now is 04:29 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org