LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 07-27-2005, 06:42 PM   #1
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Rep: Reputation: 30
Another samba permissions issue... but at least I searched!


I'm sure you guys are sick of hearing these, but I've been battling with this for a while and have searched repeatedly. I have a file server already set up with an older version of Samba. I'm now trying to get a couple shares set up so my wife can alter our web pages through SMB. I have added both her username and mine using smbpasswd and have done a chmod -R 777 on the /apache directory. Here is a copy of my smb.conf:

[global]
netbios name = mail
workgroup = ash-can
interfaces = eth0
wins support = yes
hosts allow = 192.168.1. 127.0.0.1
security = user
encrypt passwords = yes

; Browsing election control
os level = 33
preferred master = no
domain master = no
local master = no

; Logging options
log file = /var/log/samba/log.%m
log level = 3
max log size = 50

; PDC config
domain logons = no

; Share defaults
guest account = nobody
writeable = no
guest ok = no
hide dot files = yes
browse list = yes

[fallen-phoenix.com]
path = /apache/fallen-phoenix
comment = The fallen-phoenix web directory
browseable = yes
writeable = yes
valid users = gauge drax

[ash-can.com]
path = /apache/ash-can
comment = The ash-can web directory
browseable = yes
writeable = yes
valid users = gauge


I can browse the folders and read them... but I cannot write. Again, system permissions are 777 and the accounts are added in smbpasswd. What do I do at this point? Logging is set to 3, and I can't find a helpful entry in the log files.
 
Old 07-27-2005, 08:44 PM   #2
mpeg4codec
Member
 
Registered: Jul 2005
Distribution: Debian, Gentoo, self-built [not LFS]
Posts: 109

Rep: Reputation: 15
What are the permissions of the ash-can and fallen-phoenix directories?
 
Old 07-27-2005, 09:53 PM   #3
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Original Poster
Rep: Reputation: 30
They're all 777. I did a chmod -R 777 /apache. That should (and I verified that it did) recursively change the permissions of /apache and all it's subdirectories and contained files to 777.

Last edited by gauge73; 07-28-2005 at 08:38 AM.
 
Old 07-28-2005, 10:25 AM   #4
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Original Poster
Rep: Reputation: 30
I tried to connect to the share using the smbclient on the local machine, and I had the same problem. Here is the output:

smb: \hosted\> rm Thumbs.db
NT_STATUS_ACCESS_DENIED deleting remote file \hosted\Thumbs.db


Any assistance would be greatly appreciated.
 
Old 07-28-2005, 09:17 PM   #5
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Original Poster
Rep: Reputation: 30
*bump*

Anyone have any suggestions for me?
 
Old 07-29-2005, 08:39 AM   #6
mpeg4codec
Member
 
Registered: Jul 2005
Distribution: Debian, Gentoo, self-built [not LFS]
Posts: 109

Rep: Reputation: 15
Samba should store logs in /var/log/samba with a name like machine.log , where machine is the name of the computer you're using to connect. Try connecting from any machine [localhost works just fine too]. Once you do that, copy the last few lines from the log for that machine into here. That way, it'd be a lot easier to see exactly what's going on.
 
Old 07-29-2005, 03:02 PM   #7
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Original Poster
Rep: Reputation: 30
I can certainly do that. What log level would you like me to use?
 
Old 08-03-2005, 05:37 PM   #8
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Original Poster
Rep: Reputation: 30
This is just a thin slice from a log level three attempt:

[2005/08/03 17:36:34, 4] smbd/trans2.c:call_trans2findfirst(1431)
dptr_num is 256, wcard = Thumbs.db, attr = 6
[2005/08/03 17:36:34, 5] smbd/trans2.c:get_lanman2_dir_entry(959)
get_lanman2_dir_entry found ./Thumbs.db fname=Thumbs.db
[2005/08/03 17:36:34, 5] smbd/trans2.c:call_trans2findfirst(1482)
call_trans2findfirst - (2) closing dptr_num 256
[2005/08/03 17:36:34, 4] smbd/dir.c:dptr_close_internal(220)
closing dptr key 256
[2005/08/03 17:36:34, 4] smbd/trans2.c:call_trans2findfirst(1518)
SMBtrans2 mask=Thumbs.db directory=./ dirtype=6 numentries=1
[2005/08/03 17:36:34, 3] smbd/process.c:process_smb(1091)
Transaction 10 of length 64
[2005/08/03 17:36:34, 5] lib/util.c:show_msg(486)
[2005/08/03 17:36:34, 5] lib/util.c:show_msg(496)
size=60
smb_com=0x6
smb_rcls=0
smb_reh=0
smb_err=0
smb_flg=8
smb_flg2=51201
smb_tid=1
smb_pid=31307
smb_uid=100
smb_mid=11
smt_wct=1
smb_vwv[ 0]= 6 (0x6)
smb_bcc=23
[2005/08/03 17:36:34, 3] smbd/process.c:switch_message(886)
switch message SMBunlink (pid 766) conn 0x8cef928
[2005/08/03 17:36:34, 4] smbd/uid.c:change_to_user(194)
change_to_user: Skipping user change - already user
[2005/08/03 17:36:34, 3] smbd/reply.c:reply_unlink(1721)
reply_unlink : Thumbs.db
[2005/08/03 17:36:34, 5] smbd/filename.c:unix_convert(108)
unix_convert called on file "Thumbs.db"
[2005/08/03 17:36:34, 3] smbd/dosmode.c:unix_mode(111)
unix_mode(./Thumbs.db) returning 0744
[2005/08/03 17:36:34, 5] smbd/files.c:file_new(129)
allocated file structure 7852, fnum = 11948 (1 used)
[2005/08/03 17:36:34, 4] smbd/open.c:open_file_shared1(1251)
calling open_file with flags=0x0 flags2=0x0 mode=0744
[2005/08/03 17:36:34, 2] smbd/open.c:open_file(245)
gauge opened file ./Thumbs.db read=Yes write=No (numopen=1)
[2005/08/03 17:36:34, 2] smbd/close.c:close_normal_file(272)
gauge closed file ./Thumbs.db (numopen=0)
[2005/08/03 17:36:34, 5] smbd/files.c:file_free(439)
freed files structure 11948 (0 used)
[2005/08/03 17:36:34, 3] smbd/error.c:error_packet(105)
error string = Permission denied
[2005/08/03 17:36:34, 3] smbd/error.c:error_packet(129)
error packet at smbd/reply.c(1730) cmd=6 (SMBunlink) NT_STATUS_ACCESS_DENIED




Please help!!! :(
 
Old 08-03-2005, 08:46 PM   #9
calabash
Member
 
Registered: Sep 2003
Distribution: FC11
Posts: 128

Rep: Reputation: 15
I'll take a stab at it..

Could you lower your log level to 1 and post the output from the Win client that you said can browse the folders?

I would like the output to include the intial connection as well as the attempt to delete.

Thank you. I'm looking at the basics, hence the low log level.
 
Old 08-04-2005, 09:07 AM   #10
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Original Poster
Rep: Reputation: 30
When you say the "Win client" you mean a Windows command line client or something? I only use the GUI with Windows (I'm Windows retarded), but I use smbclient as well. Which would you prefer?
 
Old 08-04-2005, 10:21 PM   #11
calabash
Member
 
Registered: Sep 2003
Distribution: FC11
Posts: 128

Rep: Reputation: 15
Sorry, my bad. What I was trying to say was the XP box from your initial post that you successfully logged into the SAMBA server and was able to browse from.

You might want to delete the log file on your Linux box prior to this, so you do not have to wade through as much data.

With the log level lowered to 1 in smb.conf, we'll be able to see: a) who you are loggin into SAMBA as (which may or may not differ from who you think your login in as !) and b) the simple version of the rejection of your actions.

Since I do not have that much experience, I need to take baby steps in diagnosing problems.

Thanks.
 
Old 08-05-2005, 06:32 PM   #12
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Original Poster
Rep: Reputation: 30
I found out what the problem was. I did as you said and set the log level to 1. I don't know what changed, but for whatever reason I was no longer able to even log in. I looked back to the log and found an error saying that samba couldn't reset the permissions of the smbpasswd file to 600. So, I looked up that error and found that a possible cause was SELinux. Having no idea what SELinux was, I looked it up. I disabled SELinux, and not only did it get rid of the smbpasswd error, I can now write to the shares!

Thanks for all the help, guys.
 
  


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
Samba: Can see share but not access? Permissions issue? lsgko Linux - Software 2 09-05-2005 10:44 AM
Permissions issue? thoffland Debian 8 07-06-2005 02:17 PM
permissions issue with X gvaught Debian 3 01-02-2005 12:07 PM
[HELP] I can't figure out my sound issue, and I've searched for answers. 1wicked_element Linux - Newbie 14 08-08-2004 10:09 AM
Samba shares permissions issue jamespetts Linux - Software 19 04-19-2003 02:51 AM


All times are GMT -5. The time now is 09:28 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration