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.
Distribution: Slackware, VectorLinux, Smoothwall, and PCLinuxOS
Posts: 40
Rep:
Samba Client Access Denied
I've got a box setup with samba and the security is share...this means that it is totally public on my internal LAN. I do this because I want anyone that connects to my LAN (I'm behind 3 firewalls) to be able to use my 1TB share full of music, movies, games, and other data.
In the past, this has worked quite well with a centralized samba server running CentOS. However, I've decommissioned the central samba server and moved the share to my main computer.
The thing is...I can connect, browse, and change files when dual booting into Windows...Windows sees the share and I can edit and change all files or copy new files into the share.
When I mount in Linux, I can see the share, read the share, but cannot write to the share despite having security = share set in the main box smb.conf. Windows recognizes this and allows changes. Linux does not.
I have my mount command in fstab so that it will automount the share at boot:
Code:
//hostname/share /mnt/share smbfs username=% 0 0
Now I've removed the username=% above and it still doesn't work. I refuse to input fmask, uid or dmask entries on the above line because this causes a large copy of files (say, 20 songs into an artists' folder) to prompt for each file with a dialog box telling the user that some attributes cannot be changed, etc.
So the question is...what is wrong here? It works no problems with Windows and has worked with Linux (on my previous server) in the past...why does it no longer work?
Does it prompt your for a username and password, or just the "Password:" prompt that you can ignore by hitting [Enter]?
If you can mount it using the above command, you will be able to look at the output of "dmesg" when you fail to write to the share, and it will give you extra information on what the problem is.
Distribution: Slackware, VectorLinux, Smoothwall, and PCLinuxOS
Posts: 40
Original Poster
Rep:
Quote:
Originally Posted by David1357
Can you mount the share using
# mount -tsmbfs //hostname/share /mnt/share
Does it prompt your for a username and password, or just the "Password:" prompt that you can ignore by hitting [Enter]?
If you can mount it using the above command, you will be able to look at the output of "dmesg" when you fail to write to the share, and it will give you extra information on what the problem is.
Mounting the share isn't the problem...it mounts fine in Linux.
I have full read and browse access...I can't write to the share from Linux. Writing to the share with Windows works fine.
Both of those options require NO password when mounting because I have it setup that way on the samba server.
I'll attempt to get some dmesg info on this thread when I get back home to the PC
Mounting the share isn't the problem...it mounts fine in Linux.
I have full read and browse access...I can't write to the share from Linux. Writing to the share with Windows works fine.
Both of those options require NO password when mounting because I have it setup that way on the samba server.
All of that was very clear from your initial post. If you mount the share manually, you will get much more feedback on what is going on. That feedback will help us to help you.
Quote:
Originally Posted by TKS
I'll attempt to get some dmesg info on this thread when I get back home to the PC
We look forward to getting more information so that we can help you more effectively.
did you check the permissions on the folder to allow read and write I have a shared folder on samba server as well and I can read and write to it fine.
-2 means that it could not find a file or directory in the call to smb_add_request. Obviously, that is not a normal condition.
Basically, it either means you have a bug in the kernel, or a bug in the version of the samba utilities you are using, or you are using a version of the utilities that is not compatible with the kernel you are using.
From reading forum posts, it seems that the problem occurs when there are a lot of files in the directory (more than 512). How many files are in the directory on the share you are mounting? You said that this share has 1 TB of media files.
The easy things to do are
1. Upgrade your kernel
2. Upgrade your samba utilities
3. Upgrade both
I recommend trying option #1. Did you move the share from the CentOS machine to a Windows machine? If you moved it to a Linux machine with an older kernel, that might also be the problem.
I have a similar problem. I can only mount the drive as root:
/mnt# ls -l
drwxr-xr-x 2 spf users 4096 2007-12-16 00:05 share
/mnt# mount //10.0.0.101/public /mnt/share
Password:
/mnt# ls -l
drwxr-xr-x 1 root root 4096 2007-12-16 00:41 share
/mnt# chown -R spf:users share
chown: changing ownership of `share': Operation not permitted
/mnt# umount /mnt/share
/mnt# mount -o username=spf //10.0.0.101/public /mnt/share
Password:
/mnt# ls -l
drwxr-xr-x 1 root root 4096 2007-12-16 00:41 share
/mnt# mount
...
...
//10.0.0.101/public on /mnt/share type smbfs (rw)
/mnt# umount /mnt/share
/mnt# su spf
/mnt$ mount //10.0.0.101/public /mnt/share
mount: only root can do that
/mnt$
Also making new directories as root is allowed, but change of ownership is not allowed.
I checked dmesg, but there are no error messages related to the mounts.
The network drive is a mass storage device which can be used by anyone. Under Windows it doesn't give any problems.
Originally, the drive only supports Windows and Mac.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.