vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Otto Moerbeek wrote: > > ~% ./test > > ./test[2]: cannot create /mnt/nfs/nowplaying: Operation not permitted > > As which user was the command done? My own user. > I first though a truncate of a file was failing (if you look at > the log you'll see the setattr sz 0x0, but I made a litle test > case that just runs fine. > > Also, it is strange your client report _creation_ failure. It > should not create a file in this case, AFAIK. > > Can you modify your test script so it cleary reports if the > redirect is failing or the touch. > Also, The permissions of the parent dir are interesting. Please > include ls -n info, and id info for your users; I like to see > the numbers. ~% cat test #!/bin/sh echo uid: $(id -u) user: $USER ls -nd /mnt/nfs/nowplaying /mnt/nfs/ echo -n 'TEST: echo foo > /mnt/nfs/nowplaying RESULT: ' echo foo > /mnt/nfs/nowplaying echo ls -nd /mnt/nfs/nowplaying echo -n 'TEST: touch /mnt/nfs/nowplaying RESULT: ' touch /mnt/nfs/nowplaying echo ls -nd /mnt/nfs/nowplaying Look at the filesizes! ~% ./test uid: 1000 user: han drwxr-xr-x 24 1000 3000 1536 2006-03-28 12:05 /mnt/nfs/ -rw-rw-r-- 1 1006 3000 4 2006-03-28 12:10 /mnt/nfs/nowplaying TEST: echo foo > /mnt/nfs/nowplaying RESULT: ./test[5]: cannot create /mnt/nfs/nowplaying: Operation not permitted -rw-rw-r-- 1 1006 3000 4 2006-03-28 12:10 /mnt/nfs/nowplaying TEST: touch /mnt/nfs/nowplaying RESULT: -rw-rw-r-- 1 1006 3000 0 2006-03-28 12:13 /mnt/nfs/nowplaying ~% sudo -u bascuppen ./test uid: 1006 user: bascuppen drwxr-xr-x 24 1000 3000 1536 2006-03-28 12:05 /mnt/nfs/ -rw-rw-r-- 1 1006 3000 0 2006-03-28 12:13 /mnt/nfs/nowplaying TEST: echo foo > /mnt/nfs/nowplaying RESULT: -rw-rw-r-- 1 1006 3000 4 2006-03-28 12:13 /mnt/nfs/nowplaying TEST: touch /mnt/nfs/nowplaying RESULT: -rw-rw-r-- 1 1006 3000 4 2006-03-28 12:13 /mnt/nfs/nowplaying Now I change the ownership of the file, keep looking at that filesize. ~% ./test uid: 1000 user: han drwxr-xr-x 24 1000 3000 1536 2006-03-28 12:05 /mnt/nfs/ -rw-rw-r-- 1 1000 3000 4 2006-03-28 12:13 /mnt/nfs/nowplaying TEST: echo foo > /mnt/nfs/nowplaying RESULT: -rw-rw-r-- 1 1000 3000 4 2006-03-28 12:14 /mnt/nfs/nowplaying TEST: touch /mnt/nfs/nowplaying RESULT: -rw-rw-r-- 1 1000 3000 4 2006-03-28 12:14 /mnt/nfs/nowplaying ~% sudo -u bascuppen ./test uid: 1006 user: bascuppen drwxr-xr-x 24 1000 3000 1536 2006-03-28 12:05 /mnt/nfs/ -rw-rw-r-- 1 1000 3000 4 2006-03-28 12:14 /mnt/nfs/nowplaying TEST: echo foo > /mnt/nfs/nowplaying RESULT: ./test[5]: cannot create /mnt/nfs/nowplaying: Operation not permitted -rw-rw-r-- 1 1000 3000 4 2006-03-28 12:14 /mnt/nfs/nowplaying TEST: touch /mnt/nfs/nowplaying RESULT: -rw-rw-r-- 1 1000 3000 0 2006-03-28 12:14 /mnt/nfs/nowplaying > Also, I like to know if you can edit the file using an editor. Note: I used mg on linux, which creates backups like it should, by making a copy and not by moving and creating a new file. ~% ls -nd /mnt/nfs/nowplaying -rw-rw-r-- 1 1000 3000 4 mrt 28 12:20 /mnt/nfs/nowplaying ~% sudo -u bascuppen mg /mnt/nfs/nowplaying ;; writing failed, file untouched. ~% ls -nd /mnt/nfs/nowplaying -rw-rw-r-- 1 1000 3000 4 mrt 28 12:20 /mnt/nfs/nowplaying Change of owner: ~% ls -nd /mnt/nfs/nowplaying -rw-rw-r-- 1 1006 3000 0 mrt 28 12:20 /mnt/nfs/nowplaying ~% sudo -u bascuppen mg /mnt/nfs/nowplaying ~% ls -nd /mnt/nfs/nowplaying -rw-rw-r-- 1 1006 3000 12 mrt 28 12:22 /mnt/nfs/nowplaying ~% mg /mnt/nfs/nowplaying ;; writing failed, file cleared. ~% ls -nd /mnt/nfs/nowplaying -rw-rw-r-- 1 1006 3000 0 mrt 28 12:22 /mnt/nfs/nowplaying Which made me thing it was something the editor did, so I checked the inode. And the inode remains the same. > Oh and please make sure you really ARE running the diff, I > almost get the feeling you're not... Most certainly because with the unpatched version I cannot touch. ~% l /bsd /usr/src/sys/arch/i386/compile/GENERIC/bsd -rwxr-xr-x 1 root wheel 5.3M Mar 28 10:14 /bsd -rwxr-xr-x 1 han wsrc 5.3M Mar 28 10:13 /usr/src/sys/arch/i386/compile/GENERIC/bsd # Han -- \_/ A woman forgives the audacity of which her beauty m00h ( _ ) -(_)- has prompted us to be guilty. -- LeSage \ ~O o~__ / \ (._.)_|\ ________|_|_|_________ |