Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've got a Fedora 10 server with a simple read-only samba share.
I'm able to mount and browse the share from a Fedora 12 client, but all directories appear as empty--and I can see on the server that they contain many files. This happens whether I browse using smbclient, or mount using mount.cifs.
I've got smb/nmb ports enabled on both the client and server. File permissions on the server look right.
The server smb.conf setup:
Code:
[global]
security = user
passdb backend = tdbsam
[media]
comment = Media Library (read-only)
path = /media
public = yes
read only = yes
I can mount the share from the client, and browse using smbclient. However, all directories are empty (most contain between 1 and 10 files).
Any ideas what this could be? I don't see any errors in the server logs, even running at maximum log level.
On the server, this is the /media directory, off the root. Here is how that looks:
Code:
% ls -al /media
total 20
drwxr-xr-x 4 media media 4096 2009-11-14 05:09 .
drwxr-xr-x 22 root root 4096 2010-04-24 00:10 ..
drwxr-xr-x 6 media media 4096 2010-03-22 20:16 audio
drwxr-xr-x 13 media media 4096 2009-11-14 05:13 photos
(and obviously, the . entry describes the /media folder permissions as seen from the root directory)
I appreciate the help! This is a strange one: I've gotten cifs mounts to work before, but this is strange behavior.
I've commented out the fstab entry, and used smbclient instead. I got the same behavior: I could navigate the directories, but they all showed zero files (even when I can see on the server that there are many files there).
For instance, I also run mediatomb on the same directory tree on the server, and it is able to find and expose all of the media files. I'm guessing my samba share is set up funky on the server.
Are there particular ports I should watch out for on the firewall? I ran system-config-firewall-tue on the server, and opened the standard samba ports.
No, tomva isn't in the media group on the server. Although in the samba logs on the server it looks like the client is authenticating as user 'nobody', which I think makes sense for an anonymous public share.
Doh! I was just looking at the server logs again. I thought I had checked them before, but apparently either I didn't, or I hadn't checked them since bumping up the log level.
If I go to a particular directory in my media share (audio/Artists/Yello) that only contains one file, the directory listing (as seen on the client) looks empty. This is what I saw in the server logs when I ran that command:
It is apparently getting a permission denied to even read the file. Even if I give the file full permissions for everyone (chmod 777) I still can't see it in the directory--and I don't want to give the world write permissions anyway!
According to the lstat() man page,
Code:
No permissions are required on the file itself, but — in the case of stat() and lstat() — execute (search) permission is required on all of the directories in path that lead to the file.
I've just checked: the world has execute permissions on everything in the media tree on the server! Any ideas what could be wrong?
Sorry for the delay! Got caught up in other things.
Here is my smb.conf file, from /etc/samba:
Code:
[global]
workgroup = LakeHaven
server string = Samba Server Version %v
netbios name = julius
# logs split per machine
log file = /var/log/samba/log.%m
# max 50KB per log file, then rotate
max log size = 50
log level = 5
security = user
passdb backend = tdbsam
load printers = yes
cups options = raw
[homes]
comment = Home Directories
browseable = no
writable = yes
[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
guest ok = no
writable = no
printable = yes
[media]
comment = Media Library (read-only)
path = /media
public = yes
read only = yes
[media-rw]
comment = Media Library (writeable)
path = /media
public = yes
writeable = yes
valid users = media
As you can see, I've also got a writeable share (media-rw), but right now I'm just trying to get the read-only share to work.
well, are you trying to view both of these shares at the same time on one pc connected to the samba server? Because, it is only possible to pass one set of credentials to the server, not an individual set for each share. Does that make sense to you? So if you auth as user media, you will see the writeable share, but not the read only share, since both are mapped to the same backend directory: /media . If you auth as tomva, you should be able to see the read-only share. Does that help?
So if you auth as user media, you will see the writeable share, but not the read only share, since both are mapped to the same backend directory: /media . If you auth as tomva, you should be able to see the read-only share.
I think that makes sense! However, I only connect to one share at a time, and for the read-only share my /etc/fstab is set up for me to authenticate as guest, not tomva.
(So I authenticate as a guest on the server, but the files are mapped to the local user tomva on the client). And I never set up user tomva for smb authentication on the server using smbpasswd, so I don't think I can authenticate as tomva.
On the server, it looks like I authenticate as user nobody (user ID 99) when I connect to the read-only share.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.