Hello.
Look at this:
[sergey@gleam sergey]$ uname -s -m -r
Linux 2.4.17 i586
[sergey@gleam sergey]$ mount | grep /home
/dev/hda11 on /home type ext3 (rw)
[sergey@gleam sergey]$ pwd
/home/sergey
[sergey@gleam sergey]$ id
uid=502(sergey) gid=100(users)
groups=100(users),10(wheel),13(news),512(ftpadmin),513(dos)
[sergey@gleam sergey]$ stat .
  File: "."
  Size: 8192            Blocks: 16         IO Block: 4096   Directory
Device: 30bh/779d       Inode: 1279        Links: 65
Access: (0755/drwxr-xr-x)  Uid: (  502/  sergey)   Gid: (  100/   users)
Access: Sun Mar 31 23:46:48 2002
Modify: Sun Mar 31 23:47:17 2002
Change: Sun Mar 31 23:47:17 2002
[sergey@gleam sergey]$ touch testfile
touch: setting times of `testfile': Permission denied
[sergey@gleam sergey]$ echo >test
[sergey@gleam sergey]$ stat test
  File: "test"
  Size: 1               Blocks: 8          IO Block: 4096   Regular File
Device: 30bh/779d       Inode: 1853        Links: 1
Access: (0644/-rw-r--r--)  Uid: (  100/ UNKNOWN)   Gid: (    5/     tty)
                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Access: Sun Mar 31 23:49:52 2002
Modify: Sun Mar 31 23:49:52 2002
Change: Sun Mar 31 23:49:52 2002
[sergey@gleam sergey]$ su
Password:
[root@gleam sergey]# id
uid=0(root) gid=0(root)
группы=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)
[root@gleam sergey]# echo >test2
[root@gleam sergey]# stat test2
  File: "test2"
  Size: 1               Blocks: 8          IO Block: 4096   Regular File
Device: 30bh/779d       Inode: 1854        Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    7/      lp)
                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Access: Sun Mar 31 23:51:55 2002
Modify: Sun Mar 31 23:51:55 2002
Change: Sun Mar 31 23:51:55 2002
[root@gleam sergey]# id
uid=0(root) gid=0(root)
группы=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)
Why when I'm trying to create new file, it has bad UID and GID?
Whis happening after I mounted it with Linux 2.2 as ext2 file system.
Before this it was working just well.
-- 
Sergey Ulanov
sulanov@land.ru
On Apr 01, 2002 00:27 +0400, Sergey Ulanov wrote:> [sergey@gleam sergey]$ id > uid=502(sergey) gid=100(users) groups=100(users),10(wheel),13(news),512(ftpadmin),513(dos) > [sergey@gleam sergey]$ echo >test > [sergey@gleam sergey]$ stat test > File: "test" > Size: 1 Blocks: 8 IO Block: 4096 Regular File > Device: 30bh/779d Inode: 1853 Links: 1 > Access: (0644/-rw-r--r--) Uid: ( 100/ UNKNOWN) Gid: ( 5/ tty) > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Access: Sun Mar 31 23:49:52 2002 > Modify: Sun Mar 31 23:49:52 2002 > Change: Sun Mar 31 23:49:52 2002Maybe it is your glibc? You should run this under "strace" to see what is actually being passed to the kernel. Cheers, Andreas -- Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto, \ would they cancel out, leaving him still hungry?" http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert
On Mon, Apr 01, 2002 at 01:40:04AM -0700, Andreas Dilger wrote:> On Apr 01, 2002 00:27 +0400, Sergey Ulanov wrote: > > Maybe it is your glibc? You should run this under "strace" to see what > is actually being passed to the kernel.No. Glibc works well. There is no problem then I creating new file on reiserfs or on ext2fs. -- Sergey Ulanov sulanov@land.ru
Hi, On Mon, Apr 01, 2002 at 12:27:52AM +0400, Sergey Ulanov wrote:> > [sergey@gleam sergey]$ touch testfile > touch: setting times of `testfile': Permission denied > [sergey@gleam sergey]$ echo >test > [sergey@gleam sergey]$ stat test > File: "test" > Size: 1 Blocks: 8 IO Block: 4096 Regular File > Device: 30bh/779d Inode: 1853 Links: 1 > Access: (0644/-rw-r--r--) Uid: ( 100/ UNKNOWN) Gid: ( 5/ tty) > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Did either of these "testfile" or "test" files exist before you tried this? --Stephen