apache2 site building and samba share account not logging in

i’m having difficulty with these two issues.

#1 i’m a novice in webpage building and i was hoping to build one using my opensuse 11.2 server. i’m trying to make a webpage to test but i have no idea where to place it or what files to configure.

#2 i can see my samba share just fine on a windows computer, but when i go to log in as a user, it won’t let me through. it’ll just keep asking me for the password. the smb.conf file looks correct so i don’t know where teh problem could be.

thanks in advanced.

Hi

#1 your web pages etc normally reside down in /srv/www/htdocs but that
can be anywhere you decide to place them :wink: It’s just a matter of
configuring down in /etc/apache2.

Suggest you have a read through the topics here
http://en.opensuse.org/Howto#Web_Server

#2 have a look here at swerdna’s excellent howto’s;

I’m guessing you probably need to add your user with smbpasswd…


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.45-0.1-default
up 18 days 1:51, 4 users, load average: 0.52, 0.72, 0.45
GPU GeForce 8600 GTS Silent - CUDA Driver Version: 195.36.15

ok, well i got problem 1 solved. i just didn’t quite understand where to put the file.

problem 2 is an odd one though. when i to to type smbpasswd test and type in a new password, i get “failed to find entry for user test.”

i added the user doing the useradd command. i don’t know what could be the problem with that. any other suggestions?

did this

[test]
comment = test
inherit acls = Yes
path = /home/test
read only = No
admin users = test
available = yes
read only = no
browsable = yes
public= yes
writable = no

and got it working. though, i get an access denied statement when i go to make a new folder. i’ll tinker around with it some more to see if i get it working right.

Hi
I think it’s


smbpasswd -a test


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.45-0.1-default
up 18 days 4:09, 4 users, load average: 0.12, 0.14, 0.24
GPU GeForce 8600 GTS Silent - CUDA Driver Version: 195.36.15

A few comments on your stanza for [test]:

  • “path = /home/test” seems to me likely belongs to root which is a bad idea for a samba share
  • “read only = no” actually means “writable = yes” which is in conflict with your other property “writable = no”
  • “public = yes” makes the share accessible by anyone (guests) but did you mean this? If so then the share needs to be reworked with different ownership.
  • “admin users = test” means any operations by a user named “test” is done with root privileges which is a pretty bad idea unless you really mean it to be so (maybe you do)

I recommend that you look at a list of [shares] that are known to work and select one of those to start with.
Such a list exists here: Samba Server and Suse / openSUSE: HowTo Configure a Professional File Server on a SOHO LAN

(the list of shares starts at Part II)

Just an afterthought: this might be worth a read:
HowTo: Configure a Linux Apache Web Server on Suse/openSUSE for SSI Includes, CGI Common Gateway Interface, AddHandler, ExecCGI, AllowOverride, htaccess, DocumentRoot

It could be more useful to write the output of ls -ld /home/test
And, if I understand corrrectly, you want to have full access that directory. But, that directory belongs to user test. So, I believe that you must log-on with that user in your samba server.

I had similar problems in the past. I solved them as follows:

I have created a group named www. In that group I have added the users that can edit web sites, as well as the wwwrun user (under which apache runs).
I use the /srv/www/vh/sitename as the directory in which I put my websites. I configure apache in accordance to that. Then, I alter the permissions of the new directory to:
chown -R auser:www /srv/www/vh/sitename
chmod 775 auser:www /srv/www/vh/sitename

Now, in samba, I use the following:

[sitename]
path = /srv/www/vh/sitename
Comment = A nice comment
guest ok = No
Browseable=Yes
writelist = @www
create mask=664
directory mask=775
read only = Yes
directory mask = 0775

Although it seems that the read only will not allow you to modify the directory structure, the writelist overrides it.
You don’t need root privileges for the directory management. If you cannot write to the samba share, then either samba is mis-configured, or you haven’t set the correct permissions at the Linux level. Samba cannot override filesystem permissions.

www is the linux group that the web site editor belongs to. So, in your case it would be users or www or whatever you decide to call it.

If it’s not working, then check again the FS permissions…

sorry for the late reply. thanks for the suggestions. i’ll definitely look into them and report back when i get it working correctly.

@swerdna: ya, this share is only a test for me so that i can understand how to setup a linux server. i’m new to linux and i don’t know all the ins and outs just yet.