[olug] root: permission denied, on reiserfs dir?

Jay Hannah jay at jays.net
Sat May 31 11:24:52 UTC 2003


Brian Wiese wrote:
> I have a 60gig reiserfs formatted hard drive in a nearby gnu/linux box
> being shared (/mnt/lib-data) with samba.  I am backing up my data from
> several computers, but just now came into a situation where not even root
> can modify (write/delete) data on this one directory "windoze" though
> samba...
> 
> So here are the different directories I have for backups from each
> computer:
> 
> franklin:/mnt/lib-data/backups# ls -al
> total 44
> drwxr-xr-x    1 root     root         4096 May 24 22:23 .
> drwxr-xr-x    1 root     root         4096 May 24 22:17 ..
> drwxr-xr-x    1 root     root         4096 May 24 22:21 braveheart-deb
> drwxr-xr-x    1 root     root         4096 Nov 27 21:03 franklin-deb
> drwxr-xr-x    1 root     root         4096 May 24 22:21 freedom-laptop
> drwxr-xr-x    1 root     root         4096 Jan 30 10:28 liberty-suse
> drwxr-xr-x    1 root     root         4096 May 24 22:24 newfolder
> drwxr-xr-x    1 root     root         4096 May 24 22:22 patriot-obsd
> drwxr-xr-x    1 root     root         4096 May 24 22:22 solo_laptop_saves
> drwxr-xr-x    1 root     root         4096 May 24 16:40 windoze
> 
> Now I just copied data over to the "windoze" directory from a WinXP
> system, but all of the files appeared to have proper permissions set.  I
> could "touch dirname/new", "rm dirname/new" as much as I wanted for any of
> the above directories -- except the "windoze" one!

Sorry, I'm confused. I assume all the data that exists under /mnt is
mounted data, not copies. If you *copied* data from your windoze mount
point, you copied it to a filesystem other than /mnt, right?

> I tried going down as deep into the directory as possible to remove a
> file, and could not.
> 
> franklin:/mnt/lib-data/backups/windoze/scanned-docs# ls -al
> total 37458
> drwxr-xr-x    1 root     root         4096 May 24 16:39 .
> drwxr-xr-x    1 root     root         4096 May 24 16:40 ..
> drwxr-xr-x    1 root     root         4096 May 24 16:39 Officemax-Rebates
> -rwxr-xr-x    1 root     root       116232 May 24 16:39 UNO-finaid-audit-1.jpg
> -rwxr-xr-x    1 root     root      5052653 May 24 16:39 w2s-2002.JPG
> 
> franklin:/mnt/lib-data/backups/windoze/scanned-docs# rm w2s-2002.JPG
> rm: cannot remove `w2s-2002.JPG': Permission denied

Here you're trying to delete a file from a Samba mount point, right? If
so, all you're actually doing is using Samba to send a CIFS/SMB file
deletion *request* to the Windoze machine in question. If you get
"Permission denied" back that means that Windoze told Samba to bugger
off.

> - solution -
> 
> When I logged in locally on the machine (liberty) sharing this drive
> though, I was able to su to root and modify (write/delete) any file there
> I wanted... but if I recall user bwiese (who had permissions to do so)
> could not do that.  Is there any possible explanation for this of just bad
> magic??!!  I feel pretty humble being "root" and not being able to delete
> a file when I wanted to... would this have anything to do with copying the
> files over from a Winxp machine?

-ponder-  Since Windoze is in control here, you'll have to satisfy its
security settings. There's nothing magically powerful about the user
"root" when you're sending CIFS/SMB file deleteion requests to a remote
machine. Typically (in my experience at least) you mount Samba mounts
*as* root, but using some other username/password known to the Windoze
machine. Windoze, then, sees the connection and all requests as that
username, not as root...

HTH,

Jay Hannah
Omaha Perl Mongers: http://omaha.pm.org


More information about the OLUG mailing list