Permission Denied, as root?

New to Debian (Or Linux in general)? Ask your questions here!

Permission Denied, as root?

Postby Lamez » 2009-12-09 21:35

Hello All,

I have been getting permission denied at random spots while trying to do various tasks as root, such as this:

Code: Select all
apt-get install sudo
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  sudo
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/177kB of archives.
After this operation, 442kB of additional disk space will be used.
Selecting previously deselected package sudo.
(Reading database ... 25244 files and directories currently installed.)
Unpacking sudo (from .../sudo/sudo_1.6.9p17-2_i386.deb) ...
Processing triggers for man-db ...
fopen: Permission denied
fopen: Permission denied
fopen: Permission denied
fopen: Permission denied
fopen: Permission denied
fopen: Permission denied
fopen: Permission denied
fopen: Permission denied
fopen: Permission denied
fopen: Permission denied
fopen: Permission denied
fopen: Permission denied
fopen: Permission denied
fopen: Permission denied
fopen: Permission denied
fopen: Permission denied
fopen: Permission denied
fopen: Permission denied
fopen: Permission denied
fopen: Permission denied
fopen: Permission denied
fopen: Permission denied
fopen: Permission denied
fopen: Permission denied
fopen: Permission denied
Setting up sudo (1.6.9p17-2) ..


or these:

Code: Select all
Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!
megatron:~# /etc/init.d/squid3 restart
Restarting Squid HTTP Proxy 3.0: squid3WARNING: Cannot write log file: /var/log/squid3/cache.log
/var/log/squid3/cache.log: Permission denied
         messages will be sent to 'stderr'.
.


Now I ran this at one point in time
chown -R Lamez /



so then I tried to fix it with replacing Lamez with root.
What else do I need to fix?
Lamez
 
Posts: 23
Joined: 2008-10-27 12:45

Re: Permission Denied, as root?

Postby Bulkley » 2009-12-09 22:50

You may have something set in fstab that conflicts. A partition set as read (ro) only perhaps?
Bulkley
 
Posts: 5831
Joined: 2006-02-11 18:35

Re: Permission Denied, as root?

Postby llivv » 2009-12-09 23:13

I did a search for both:
Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!
and
WARNING: Cannot write log file: /var/log/squid3/cache.log
/var/log/squid3/cache.log: Permission denied
There are plenty of other posts with related issues...It may take a bit of work to locate the underlying problem.
Describing your system would make a solution easier to find. Especially "Kernel Version" "Desktop Environment" at least.
Have you searched the archives for sqiud3 packages that might be missing from your system?
Also, do you need sudo for some particular reason? I'll bet you already have su installed......
In memory of Ian Ashley Murdock (1973 - 2015) founder of the Debian project.
User avatar
llivv
 
Posts: 5488
Joined: 2007-02-14 18:10
Location: cold storage

Re: Permission Denied, as root?

Postby aicardi » 2009-12-09 23:33

At what point did you do this "chown -R Lamez /"?
How long have you been running the system like this?
Jessie/Xfce
User avatar
aicardi
 
Posts: 388
Joined: 2009-11-18 01:30
Location: Chicago

Re: Permission Denied, as root?

Postby plugwash » 2009-12-09 23:35

The problem is that now things are owned by root that shouldn't be, unfortunately I'm not aware of any easy way to fix all the permissions/ownership on a debian system after making a screwup like this.

For the one related to processing triggers for man-db try

chown -R man /usr/share/man

For the squid and mysql ones you will need to figure out yourself what those daemons are running as and what they are trying and failing to acesss, good luck.
plugwash
 
Posts: 2508
Joined: 2006-09-17 01:10

Re: Permission Denied, as root?

Postby bluesdog » 2009-12-09 23:40

Now I ran this at one point in time

chown -R Lamez /


Global chown is rarely a good idea...

afaik, there are only two possible ways of fixing this:

1. Replicate permissions on each and every file/folder from another non-messed-up system

2. Re-install
Tips & Tricks

Something more to read while waiting

If you obviously have not read THIS, don't expect too much...




*winter bluesdog....*
User avatar
bluesdog
 
Posts: 2082
Joined: 2006-02-01 09:02
Location: Similkameen, British Columbia, Canada

Re: Permission Denied, as root?

Postby Lamez » 2009-12-10 05:11

Hey Guys,

Wow a lot or responses leading to different things.
Okay, so I am actually liking the idea of a fresh install. My system is Debian Lenny, I have no desktop, all command line (for a learning experience). When I changed all groups to Lamez, it was like for a second, I did one reboot and started to notice errors. Those errors I posted are a few, I fixed the SSH problem (I did not post that).

Thanks for all the help, I thought there would be a quick fix, but oh well. I am just going to grab my net-install disk, print out my setup tutorial (I wrote), and give this another stab.

This will allow me to setup Squid correctly the first time, RADIUS correctly. Thanks Guys.
Lamez
 
Posts: 23
Joined: 2008-10-27 12:45


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable