LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 08-27-2009, 01:42 PM   #1
Chunky77
LQ Newbie
 
Registered: Aug 2009
Posts: 24

Rep: Reputation: 15
Help fixing: setgrid: Operation not permitted (when trying to "su")


I think I chmodded something wrong on accident, or chown or something. I remember either doing chmod or chown on the root as a complete accident, I stopped it as soon as I noticed, but it had already done quite a bit I think. I think that after searching the net I found out this was my error. I just need to know what the permissions need to be in order for me to be able to work as root again

Thanks guys
 
Old 08-27-2009, 01:55 PM   #2
Chunky77
LQ Newbie
 
Registered: Aug 2009
Posts: 24

Original Poster
Rep: Reputation: 15
I use Debian Lenny, by the way
 
Old 08-27-2009, 06:21 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,362

Rep: Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377
Can you search back through your bash history and show us the exact cmd? It'll help enormously.
 
Old 08-27-2009, 07:01 PM   #4
Chunky77
LQ Newbie
 
Registered: Aug 2009
Posts: 24

Original Poster
Rep: Reputation: 15
I used the up arrow, and that only goes a little ways. Is there a better way to find out a larger history?
 
Old 08-27-2009, 07:05 PM   #5
kdelover
Member
 
Registered: Aug 2009
Posts: 311

Rep: Reputation: 36
type the command history and paste its contents here.
 
Old 08-30-2009, 11:18 PM   #6
Chunky77
LQ Newbie
 
Registered: Aug 2009
Posts: 24

Original Poster
Rep: Reputation: 15
I did that, but it still didn't list all of it Just the ones from the last few days. I didn't quite notice right away. It took me a few days before I tried to become root. By then, it was too late.

Last edited by Chunky77; 08-30-2009 at 11:20 PM.
 
Old 08-30-2009, 11:28 PM   #7
Chunky77
LQ Newbie
 
Registered: Aug 2009
Posts: 24

Original Poster
Rep: Reputation: 15
Ok, I found what I did (I had to log into single-user mode to log in as root, and run history and save it to an output file. ANYWAYS, here's the relevant lines:

94 chown -hR rewt /*


(rewt is my 2nd user, not root... obviously lol)

Ok, so now I know what the issue is. Should I chown -hR root on whichever root directories aren't owned by root?
 
Old 08-30-2009, 11:39 PM   #8
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,362

Rep: Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377Reputation: 2377
Unless Debian has an autofix tool for perms/ownerships, you could try it.
My guess is you'll still have some stuff now (after doing that) owned by root that should be owned by other users eg major services like apache etc.
If it was me I'd seriously look at a re-install, you'll (probably) never get it all straight again.
However, wait till a Debian export chips in, you might get lucky.
Good luck.
 
Old 08-31-2009, 12:59 AM   #9
Chunky77
LQ Newbie
 
Registered: Aug 2009
Posts: 24

Original Poster
Rep: Reputation: 15
Thanks for the information. I just started the reinstall process. Hopefully I won't be so stupid to do that again this time
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"creating symbolic link" "operation not permitted" wheni Linux - Newbie 3 05-08-2011 01:36 AM
Logged in as "root"/Fedora 8 but get "Operation not permitted" when using "chmod etc gosunlee Linux - Newbie 7 02-10-2008 05:56 AM
"capset: Operation not permitted" error when I run valgrind. rsravi74 Linux - Newbie 1 09-02-2007 05:30 PM
hdparm -d1 /dev/hda gives me "HDIO_SET_DMA failed: Operation not permitted" elluva Linux - Hardware 7 07-21-2007 03:49 AM
"Operation not permitted" error logging in to Ubuntu Dapper Drake paulBottomley Linux - Newbie 7 08-10-2006 11:13 AM


All times are GMT -5. The time now is 12:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration