Mailinglist Archive: opensuse (2459 mails)

< Previous Next >
Re: [opensuse] Permission problem while accessing a folder mounted with CIFS
  • From: "Rodney Baker" <rodney.baker@xxxxxxxxxxxx>
  • Date: Mon, 17 Mar 2008 17:15:03 +1030 (CST)
  • Message-id: <44712.>

On Mon, March 17, 2008 11:48 am, John Andersen wrote:
On Sun, Mar 16, 2008 at 6:27 AM, Alexander Winizki <awinizki@xxxxxx>
I hav a PC with OpenSuse 10.3. In my network there is another box named
"dreambox" which is running a Samba server.
I want to open a file on this machine with a Java program running on my
PC. I mount the shared folder by issuing the following
command as root:

mount -t cifs -o user=root -o rw //dreambox/harddisk /mnt/dreambox

Then I can list the contents of the mounted folder. The file I want to
open is listed as follows:

-r-xr-xr-x 1 root root 2147483580 31. Dez 11:45 movie.ts

Then if I try to copy it to the local disk, I get an error message:

#cp movie.ts /home
cp: movie.ts cannot be opened for reading: No permission

But according to ls everyone has a reading permission!

It sucks that you have to allow mounting anything thru samba as root!
Its just wrong on so many levels.
Worse, your guest account = root! Yikes.

Yes, this is very bad practice. There is a problem with the way your
shares are defined. The Samba server does not necessarily use the file
system permissions on the server - it maps shares with a different set of
permissions that can be defined on a global or share-by-share basis.

You definitely should not have the file (or the share) owned by root. What
level of security do you have set for Samba?

Rodney Baker VK5ZTV
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups