Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi,
I have fedora 10 installed, dual boot with Vista.
I accidently issued command chmod 777 / and now linux is not loading.
I need to backup my important data. I tried accessing files from windows installing some good software but only grub partition is accessible other drive showing nothing.
When you ran chmod 777 /, you only affected the top level directories. If you had done something like this chmod -R 777 /, this would be even more serious.
You could do what the others have mentioned by issuing the command
chmod 644 /, but this would make all directories with those permissions.
The typical root filesystem will have different permission settings like
755, 644, etc and some folders will have additional attributes like the sticky bit -- octal value 1777 (eg. the /tmp folder)
I would do a re-install just to be safe. Make sure you backup your files and bookmarks if you don't have a separate home partition.
@san_to_all: running 'rpm -qf /' should yield "filesystem" (package name) and then 'rpm --setperms filesystem' should fix things the Red Hat way. Doing it any other way might be distro-agnostic but inconvenient, inefficient, unnecessary, dangerous or whatever else negative. (And yes, you shouldn't run F10 anymore.)
What is "cute" are matured, supported and maintained package management systems that out of the box still do not provide certain functionality. Of course for certain groups of users dictatorships, philosophies, lore, contracts, herd instinct and whatnot have proven to be way more enticing and important arguments than say manageability and efficiency...
Hi,
Sorry guys I forgot to tell you in detail what caused the problem.Here is the story.
I put one simple html page in /var/www/mywebdir/abc.htm just to test weather it is accessible or not. Browser showed error permission denied. then I issued command like this
chmod 777 /var/www/mywebdir/abc.htm
chmod 777 /var/www/mywebdir/
chmod 777 /var/www/
chmod 777 /var/
chmod 777 /
As soon as I issued last command, literally everything was going to its 'roots'! I mean Icons changed like windows 3.1 had, Desktop color changed black and white, and lots of other strange activities was going on. In panic I quickly issued a command chmod xxx / to restore things back(Where xxx was the figure something lower than 777 previliage which I don't remember now. I think it was 421).This does not helped me.I tried to copy my data in pendrive but it was too late.
Anyway I logged in single user mode. and issued a command chmod 644 /
but nothing seems to going right.
I tried unSpawn's suggestion rpm -qf / and rpm --setperms and the response was 'no arguments given for query'
Hopefully lots of linux services started very well.
In error messages, for me, familiar words was selinux, and
/var/log could not open log etc. and other programs showing directory /var
The reason behind using F10 is that I have very old computer with little ram. I fear more advanced destros might not install. But surely I will try to install F13. But most importand thing to me is my data. Which I had not backedup.
------------
Correction:
issuing command rpm -qf / yielded package name filesystem.
but the second command rpm --setperms <filesystem> I typed just rpm --setperms. sorry for that.
Last edited by san_to_all; 09-26-2010 at 01:24 AM.
if you want to have the parent directory and it's sub directories to have the same permissions, all you need to do is add the -R option.
Example
Code:
chmod -R 777 /var/www
BTW, that is a bad permission for a web server. The permission is usually 755 -- and I see some with the permission setting of 705 like the public_html/ folder.
7 (rwx) means the owner (root) can read, write, execute a file or enter the directory.
5 (r-x) means the group user can read, execute a file or enter the directory.
5 (r-X) means everyone can read, execute a file or enter the directory.
The execute bit (--x), the octal value of 1 has two meanings:
A file with the execute bit means it is executable.
A directory with the execute bit means permission to enter the directory.
Anyway, I will stick to my original suggestion of a re-install if things becomes even more weird. Especially if this is a public internet server. You can't have messed up permissions everywhere as this could compromise your system.
I tried unSpawn's suggestion and issued a command
rpm -qf /
and response was filesystem-2.4.19-1.fc10.i386
and issuing commmand
rpm --setperms filesystem-2.4.19-1.fc10.i386
and response was sh: -line 1: syntax error near unexpected token ')'
sh: -line 1: '[ -L '/'] || chmod t a number) '/''
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.