LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 09-06-2008, 03:41 AM   #1
phil81
Member
 
Registered: Jun 2003
Location: France
Distribution: Lenny/sid
Posts: 141

Rep: Reputation: 15
Samba issue on Lenny with new kernel 2.6.26.1.486 no read write access ?


HI
I am using lenny/sid i386 after the last kernel upgrade from 2.6.25-2-486 to 2.6.26.1.486 I now have a problem with my samba share.

I have a Raid 5 samba/mysql/apache server on my local network running debian stable

I mount my samba shares on the server locally in fstab :
Quote:
//192.168.0.2/data /media/samba/data smbfs auto,users,username=*****,password=*****,workgroup=**** 0 0
Since the update I can not save files or projects using any KDE aps. I use QUANTA for my web editing, same goes for Kate.
I get the error message
Quote:
Not enough disk space or you dont have permission to write to etc...
( there is over 450 Go free space and permissions are correct on the server)

I do not get this problem with any other Gnome apps such as GEDIT or GIMP OOFICE etc
I checked and have all the correct QT libraries ?

So for now I boot on/use 2.6.25-2-486 just so that I can work, but I would like to use 2.6.26.1.486.

This is specific to this PC as My lap top is running 2.6.26.1.486 and I have no issues there, I can connect to the server and work ok.


It just looks like KDE aps dont have read write acces to samba shares I thought it was a group issue but even when I mount the samba partition as root I get the same problem!!


Has anybody come across this problem I am stumped, I could consider a reinstall but surely there must be some simple reason, which for now I have not found.

Thanks
 
Old 09-06-2008, 05:48 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
Use the cifs filesystem instead of smbfs. The smbfs is obsolete and may not be included in future kernels. Never use it again!

Also consider creating a credentials file in your home directory and using the "credentials=<path/to/file>" option. That way another user won't be able to read your credentials from the /etc/fstab file.

The _netdev option is a good one to use if the network isn't ready for you to mount a samba share. If you use /etc/fstab, you might want to use "noauto" instead so that if you aren't connected to the network, booting won't stall or fail.

You can enter "sudo mount -a -o _netdev" to mount all of the entries in /etc/fstab that have the _netdev option.

Please see the mount.cifs manpage for more options.

Last edited by jschiwal; 09-06-2008 at 05:53 AM.
 
Old 09-06-2008, 05:50 AM   #3
phil81
Member
 
Registered: Jun 2003
Location: France
Distribution: Lenny/sid
Posts: 141

Original Poster
Rep: Reputation: 15
Not to sure how to go about that ?
Is it an other network file system
Note that when I close the PC It hangs always with error message
Cifs not found..

Last edited by phil81; 09-06-2008 at 05:52 AM.
 
Old 09-06-2008, 05:59 AM   #4
phil81
Member
 
Registered: Jun 2003
Location: France
Distribution: Lenny/sid
Posts: 141

Original Poster
Rep: Reputation: 15
Ok fair nough, I will look at this but How come I dont have this issue with the Lap top..?
 
Old 09-06-2008, 06:03 AM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
Try "lsmod | grep cifs". If it isn't present, "modprobe cifs".

Code:
//192.168.0.2/data /media/samba/data cifs auto,users,username=*****,password=*****,workgroup=**** 0 0
Here is how my kernel is configured:
Code:
grep -i cifs /boot/config-2.6.25.11-0.1-default
CONFIG_CIFS=m
CONFIG_CIFS_STATS=y
CONFIG_CIFS_STATS2=y
CONFIG_CIFS_WEAK_PW_HASH=y
CONFIG_CIFS_XATTR=y
CONFIG_CIFS_POSIX=y
# CONFIG_CIFS_DEBUG2 is not set
# CONFIG_CIFS_EXPERIMENTAL is not set
You might consider creating a new initrd file which includes the cifs module.

Most filesystems have a kernel module that needs to be loaded before using the filesystem. For example, the "xfs" filesystem. Before mounting an xfs filesystem, you need to have the xfs module loaded.

---

Windows may shut down the NIC device when you close the lid. Look into the power saving features and the network configuration. I think it is in the Former. The same thing may happen if you unplug the power adaptor from the laptop.

Last edited by jschiwal; 09-06-2008 at 06:05 AM.
 
Old 09-06-2008, 08:52 AM   #6
phil81
Member
 
Registered: Jun 2003
Location: France
Distribution: Lenny/sid
Posts: 141

Original Poster
Rep: Reputation: 15
(I tried to find and load the cifs module with module-assistant but did not see it in the list )

This is what I have :

debian:/home/ppayne# lsmod | grep cifs
cifs 205808 1
nls_base 6528 2 nls_utf8,cifs



debian:/home/ppayne# grep -i cifs /boot/config-2.6.26-1-486
CONFIG_CIFS=m
# CONFIG_CIFS_STATS is not set
CONFIG_CIFS_WEAK_PW_HASH=y
CONFIG_CIFS_XATTR=y
CONFIG_CIFS_POSIX=y
# CONFIG_CIFS_DEBUG2 is not set
CONFIG_CIFS_EXPERIMENTAL=y
CONFIG_CIFS_UPCALL=y
CONFIG_CIFS_DFS_UPCALL=y


I changed the line in fstab to
Quote:
//192.168.0.2/data /media/samba/data cifs auto,users,username=*****,password=*****,workgroup=**** 0 0


The partition is mounted but I still dont have rights on the files with KDE apps

And the PC still hangs on shutdown message :
CIFS SERVER NOT RESPONDING

JUST CHECKED WITH lsmod
cifs is loaded
Quote:
cifs 205808 1
All non kde apps have read right access to the share

This has to be a KDE issue ?!?

No..

Last edited by phil81; 09-06-2008 at 09:09 AM.
 
Old 09-06-2008, 09:12 AM   #7
phil81
Member
 
Registered: Jun 2003
Location: France
Distribution: Lenny/sid
Posts: 141

Original Poster
Rep: Reputation: 15
Thanks jschiwal
Booting back to 2.6.25-2-486 for now

Bunch of work to do!

Ill check back here later..

Thanks Im sure well get it
:-)
 
Old 09-06-2008, 10:28 AM   #8
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
I'm not certain which PC you are closing the lid for. It sort of reminds me of the joke where a patient says, "doctor, it hurts when I bend my elbow like this". The doctor responds, "Well don't bend it like that then."

Determine whether the NIC card shuts down when you close the lid. It is probably a power saving feature or the pc may even go into standby mode. Until you found out why, don't close the lid.

You are mounting a share on the server, usually, if you have a samba server with raid, it is what is offering the shares. What computer is on 192.168.0.2? Check who has write permission to the share on the machine offering the share. Check who has write permission on the directory itself.

If you use "security = users", the default, on a machine running a samba server, there are three things you need to configure. The Windows users also need to be Samba users. The credentials need to match. If you don't use LDAP, AD or tdbsam for a password backend, you need to use smbpasswd to enter the users & passwords for the windows users.

Is the user on both the server and the client the same user? Cifs will allow you to use the same permissions and acls as you would for a local drive.

Take a look at the long listing of the mounted share.

Also check the logs on both machines.
 
Old 09-07-2008, 04:49 AM   #9
phil81
Member
 
Registered: Jun 2003
Location: France
Distribution: Lenny/sid
Posts: 141

Original Poster
Rep: Reputation: 15
I have gone over all this again and have not advanced I am still running on the 2.6.25-2-486 kernel
as on the 2.6.26.1.486 none of my KDE apps have write permission on the samba (cif) share.

What Is really weird is that my lap top running the same set up with 2.6.26.1.486 does not have this issue ??!

It has to be something specific to this PC

Maybe something with cifs not set up correctly or a network problem..
(I checked my host file all the pc's on the network are correctly declared)
The network is on DHCP and the ip addresses are reserved on the router with the mac addresses..

And the PC still hangs on shutdown message :
CIFS SERVER NOT RESPONDING

:-(
 
Old 09-08-2008, 01:38 AM   #10
phil81
Member
 
Registered: Jun 2003
Location: France
Distribution: Lenny/sid
Posts: 141

Original Poster
Rep: Reputation: 15
Thanks for all this info, still haven't figured it out!

I should add to make the point that this issue is only on 1 pc (RUNNING GNOME !) USING KDE APS, Quanta, kate etc..
I have one other PC with deb 4
one lap top with lenny
1 pc with winxp/lenny/ubuntu

They can all run KDE apps with write permissions (excl off course winxp which to my knowledge does not run any kde apps :=)

I can bring a clients PC here for an update / back up his files and I access the server immediately read/write no problem, after entering the smb password/user

I have no issues with those machines, just the current PC I am talking about here

in smb.conf on the server (192.168.0.2) I have security = users I set the passwords with smbpasswd on the server from the start
the user/pwd account on my works station and the server are the same

I can access the server with SSH the PC runs normally until I use the new kernel 2.6.26.1.486

Hope all this is clear, hardest part is explaining problems, gulp...

:-O
 
Old 09-08-2008, 11:11 AM   #11
phil81
Member
 
Registered: Jun 2003
Location: France
Distribution: Lenny/sid
Posts: 141

Original Poster
Rep: Reputation: 15
not certain what this means
Quote:
closing the lid
 
Old 09-10-2008, 04:19 AM   #12
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
It shouldn't matter whether you are trying to write using a kde app or from the shell.

Look at the mounted directory with "ls -ld". Do you have write permissions. Try creating a file in the console. E.G.: touch /mnt/share/testfile

Chech the permissions on the server. Does your user have permissions to write to the directory.
Write permissions can be denied on the filesystem, by how it is mounted, or by the samba configuration.

If a remote user doesn't exist as a Linux user on the server, then the "o" write permissions need to be disabled. If a remote user doesn't exist as an smb user (i.e. not in smbpasswd) then that user may be either denied access outright or may be aliased to the "guest" user in Samba/Windows and "nobody" in Linux.

---

I guess that I misunderstand what you mean by "close the pc". You were refering to the laptop, and I though you were closing the lid on the laptop.

Make sure that the laptop is plugged in. The system may power down the NIC device to save power otherwise. This happens on windows XP at least and you need to manually enable the NIC.

Last edited by jschiwal; 09-10-2008 at 04:23 AM.
 
Old 09-10-2008, 05:58 AM   #13
phil81
Member
 
Registered: Jun 2003
Location: France
Distribution: Lenny/sid
Posts: 141

Original Poster
Rep: Reputation: 15
Sorry for the confusion,
Tha lap top works fine with Lenny - 2.6.26-1-486 and KDE apps can read write ....

The issue is with my workstation Lenny - 2.6.26-1-486
If I boot on the previous kernel 2.6.25-2-486 there is no problem


I can read and write from a shell and any other program apart from KDE apps such as Quanta in the mounted samba partition.
/media/samba/data

Quote:
ppayne@debian:/media/samba$ ls -ld
drwxr-xr-x 4 ppayne ppayne 4096 sep 10 11:45 .
ppayne@debian:/media/samba$ cd data/
ppayne@debian:/media/samba/data$ ls -ld
drwxrwxr-x 20 ppayne ppayne 0 sep 10 2008
As I said I think this is specific bug / problem to my current set up on this particular work station

All the other PC's on the network run fine.

I am trying with no auto in fstab now to see what happens

Thanks again for all this output!
Philip
 
Old 09-10-2008, 06:03 AM   #14
phil81
Member
 
Registered: Jun 2003
Location: France
Distribution: Lenny/sid
Posts: 141

Original Poster
Rep: Reputation: 15
No Change with no auto, when I manually remount its the same..
 
Old 09-11-2008, 03:24 AM   #15
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
Monitor the samba logs on each machine as trying to write to the share. Try to create a file there, or copy a file there in the shell.

Print out the permissions of mounted share and your current /etc/fstab entry. (obfuscate a password= entry, although you should use credentials= instead)

Print out the share definition on the server. Does it use a write list?

Check for differences in the values of the pseudo files in /proc/fs/cifs/ between the two kernels. Also check the debian mailing list for similar problems with this kernel. ( They fork there own versions of openssl, firefox, etc. I wouldn't be surprised if they do the same with samba or the kernel. )

Last edited by jschiwal; 09-11-2008 at 03:36 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Debian Lenny, kernel 2.6.25-2 486 i and webcam Vimicro zc301 szamot83 Debian 0 07-17-2008 04:21 AM
Why can I not write to a SAMBA share when read/write is enabled? eric m Linux - General 4 08-21-2006 10:22 PM
SAMBA read write access desertViking Linux - Newbie 2 12-05-2005 03:06 PM
Win98 to Samba PDC write-access issue NetAX Linux - Networking 3 05-08-2004 11:42 PM
read/write remote access to fat32 via samba totococo Linux - General 2 11-06-2003 04:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 07:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration