LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 09-14-2004, 12:35 PM   #1
Caloris
LQ Newbie
 
Registered: Sep 2004
Distribution: RedHat 8.0
Posts: 2

Rep: Reputation: 0
Samba help, internal web server


I own 2 of the computers on my home LAN, one is Red Hat 8 set up as a webserver (old), the other is XP Pro (new).

Using my old computer, I’m trying to setup an internal LAN webserver so I can test my web sites ‘online’ without having to be connected to the internet while I working on the sites. (as I only have a dialup connection and limited time online, can't test them while I'm not connected and can't connect when I need to test them.)

I installed Linux and got apache working and configured. I can access the apache test page on my browser on my other computer.

The website files I have already are on my XP computer and I need to be able to transfer them to the web server. I tried setting up FTP, but the FTP server wouldn’t work. At best, I could only get guest access to view what was in the /var/ftp/ directory. After a number of attempts to get access to /var/www/, I thought ‘screw that, I might as well try SMB’.

I got samba working and configured, and I can now see the Linux box on my XP computer. I have samba set with a share of /var/www/ which shows up on the LAN, but it won’t let me transfer any files from the XP computer to the samba share. I can open files that are already on the share, but not save over them. I’m thinking it is a permission problem somewhere, but nothing I’ve tried seems to work.

After a few attempts, I got a user created and added to the smb database, this user should have full access to where I am trying to put the files (/var/www), but whenever I try via the network share, I just get access denied.

This is what I have for the share in smb.conf
Code:
[Web]

path = /var/www
public = no
guest ok = yes
writeable = yes
read only = no
printable = no
valid users = Steve
 
Old 09-14-2004, 01:24 PM   #2
nafan
Member
 
Registered: May 2004
Location: /dev/bed
Distribution: Mandriva 2009.0 Powerpack
Posts: 172

Rep: Reputation: 30
Samba tries very hard not to override the normal unix/linux file permissions so as not to second-guess the system admin. /var and it's contents are normally only writable by root but readable by everyone else, This is most likely why you can see the share, connect to it and see files, but not write to them. Loging in as root changing to /var and doing a swift (but nonetheless effective) chmod -R 777 www/ should sort the unwritable files.

If you have any security sentry that checks the permissions on files and re-sets them if they're wrong (like the directories under /home getting re-set to only be readable/writable to the login name they correspond to) you will need to configure this to make the web directory publically writable but owned by root.




*EDIT* fixing stoopid spelling mistakes

Last edited by nafan; 09-14-2004 at 01:27 PM.
 
Old 09-14-2004, 07:35 PM   #3
Caloris
LQ Newbie
 
Registered: Sep 2004
Distribution: RedHat 8.0
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks

I got it working after I saw that it would allow me to transfer to /var/www but not /var/www/html and changed the permissions with:

chmod 775 -R /var/www/
chown apache -R /var/www/
chgrp apache -R /var/www/

Is there anyway I can set up samba to use 755 apache apache for every new file it makes in that share, so I don't have to keep going back to the linux box and change the persmissions when I make a new file?
 
  


Reply



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
Access internal web server by name LoRd Of XAoS Linux - Software 2 07-02-2004 03:56 PM
Can't browse internal web server using iptables iel Linux - Networking 7 03-25-2004 12:56 AM
iptables does not allow me to access internal web server. JawjLindo Linux - Security 2 11-10-2003 02:23 PM
internal IP based web server. tusher Linux - Newbie 3 11-04-2003 12:26 PM
internal web server wants out Heaven_Hell Linux - Networking 1 06-12-2003 01:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:25 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
Open Source Consulting | Domain Registration