LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 09-29-2010, 03:23 PM   #1
john aka jondi
LQ Newbie
 
Registered: Aug 2010
Posts: 16

Rep: Reputation: 0
permission problem!!!


when i try to create a file or folder by standing as root and after that when i check its permission then the gid of root is always the value 500!!
for eg
i first logged in as root
and i created a file named "pq" in /
like this....
[root@server /]# touch pq
[root@server /]# ls -ld pq
drwxr-xr-x 2 root 500 4096 Sep 30 00:49 pq

why that gid is always 500 for me!!!

i have no idea to do anything with that..pls help!!
 
Old 09-29-2010, 03:32 PM   #2
CincinnatiKid
Member
 
Registered: Jul 2010
Posts: 450

Rep: Reputation: 47
Post the output of /etc/passwd

Last edited by CincinnatiKid; 09-29-2010 at 03:35 PM.
 
Old 09-29-2010, 03:38 PM   #3
CincinnatiKid
Member
 
Registered: Jul 2010
Posts: 450

Rep: Reputation: 47
Wait a second, maybe it is the "d" parameter. Try:

ls -l

I think the d is for a directory specifically.
 
Old 09-29-2010, 04:07 PM   #4
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,986

Rep: Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447
Quote:
when i try to create a file or folder by standing as root
WHAT

what are you doing ??
loging into the gui as root ?
or using one of these two
" su " or " su -" in the terminal ?

if i had to bet ?? it is su WITHOUT the -

please post EXACTLY what you are doing to make that folder in /
 
Old 09-29-2010, 11:49 PM   #5
gdejonge
Member
 
Registered: Aug 2010
Location: Netherlands
Distribution: Kubuntu, Debian, Suse, Slackware
Posts: 317

Rep: Reputation: 73
The fact that touch will create a directory instead of a file make me suspect that something is wrong with the root filesystem.

Step 1 is to make sure your file system is ok.

First check on which partition your rootdir is mounted
Code:
root@orion:/# mount | grep on\ /\ type
/dev/sdb7 on / type ext3 (rw,relatime,errors=remount-ro)
Reboot your system from a liveCD en do a fsck of de root partition.
Code:
# fsck /dev/sdb7
If everything checks out okay, reboot your system in single user mode. Mostly indicated as recovery in the grub menu's.

Log in as root
Now check your root uid/gid with
Code:
root@orion:/# id
uid=0(root) gid=0(root) groups=0(root)
This will tell you what the defaults for your uid/gid are and which groups you are a member of.

After that we can take it further.

___________________
Gerrard
 
Old 09-30-2010, 12:32 AM   #6
prayag_pjs
Senior Member
 
Registered: Feb 2008
Location: Pune - India
Distribution: Fedora,RedHat,CentOS,Gentoo
Posts: 1,138
Blog Entries: 4

Rep: Reputation: 147Reputation: 147
Plese give us the output of

Code:
cat /etc/passwfd |grep -i "root"
and

Code:
id
also try creating a file using cat or vi instead of touch and let us know the permissions
 
  


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
Permission problem linux6699 Linux - Newbie 1 07-11-2008 04:01 AM
Samba sharing problem (user permission problem) beikokutn Linux - Software 4 03-11-2008 06:55 AM
permission problem - "You don't have permission to access" radone Linux - General 3 07-24-2006 11:23 AM
Permission problem comprookie2000 Linux - Hardware 3 11-02-2004 02:58 PM
permission problem.. bit7 Linux - Software 4 02-26-2003 06:08 AM


All times are GMT -5. The time now is 12:49 PM.

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