Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Permission Denied, as root?

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
Lamez
Posts: 23
Joined: 2008-10-27 12:45

Permission Denied, as root?

#1 Post by Lamez »

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?

Bulkley
Posts: 6383
Joined: 2006-02-11 18:35
Has thanked: 2 times
Been thanked: 39 times

Re: Permission Denied, as root?

#2 Post by Bulkley »

You may have something set in fstab that conflicts. A partition set as read (ro) only perhaps?

User avatar
llivv
Posts: 5340
Joined: 2007-02-14 18:10
Location: cold storage

Re: Permission Denied, as root?

#3 Post by llivv »

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
aicardi
Posts: 388
Joined: 2009-11-18 01:30
Location: Chicago

Re: Permission Denied, as root?

#4 Post by aicardi »

At what point did you do this "chown -R Lamez /"?
How long have you been running the system like this?
Jessie/Xfce

plugwash
Posts: 2507
Joined: 2006-09-17 01:10
Contact:

Re: Permission Denied, as root?

#5 Post by plugwash »

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.

User avatar
bluesdog
Posts: 2077
Joined: 2006-02-01 09:02
Location: Similkameen, British Columbia, Canada
Been thanked: 1 time

Re: Permission Denied, as root?

#6 Post by bluesdog »

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....*

Lamez
Posts: 23
Joined: 2008-10-27 12:45

Re: Permission Denied, as root?

#7 Post by Lamez »

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.

Post Reply