LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-05-2005, 09:41 AM   #1
dping28
LQ Newbie
 
Registered: Feb 2003
Location: Triangle, VA
Posts: 18

Rep: Reputation: 0
Samba and Apache Permission question


Hi, I have just installed Ubuntu and installed apache/mysql/php and samba. currently in order to add/edit/remove files/pages in /var/www for my site I have to be root. Could someone tell me the correct way to alter the permissions of this directory so I can do all this with say "user1". and currently I can access this machine from windows with said "user1" and view that users home directory. Could you also tell me the correct way to add /var/www for that user so I can edit these files from my windows boxes. Thanks!

-D
 
Old 06-05-2005, 12:09 PM   #2
saman007uk
Member
 
Registered: Dec 2003
Location: ~root
Distribution: Debian
Posts: 363

Rep: Reputation: 33
You should add a virtual host and change the ServerRoot of that Virtual Host to a more appropriate folder where the user would have access. This is typically somewhere like /home/user/public_html, rember tha the public_html directory must be globally readable.

To do this, you have to change your configuration file (/etc/apache/httpd.con). For example, on my debian system I add this:
Code:
<VirtualHost my-ip:80>
ServerName domain.name
ServerAlias www.domain.name
DocumentRoot /address/to folder/
</VirtualHost>
Please note that you need to enable the Virtual Host module. And also, given the IP for the Virtual Server.
Code:
LoadModule vhost_alias_module /usr/lib/apache/1.3/mod_vhost_alias.so

NameVirtualHost my-ip:80

Last edited by saman007uk; 06-05-2005 at 12:11 PM.
 
Old 06-05-2005, 12:11 PM   #3
verzonnen
Member
 
Registered: Aug 2003
Posts: 31

Rep: Reputation: 15
chown -R user1 /var/www

And of course do not forget to read the man pages for chown and chmod
 
Old 06-06-2005, 12:11 AM   #4
dping28
LQ Newbie
 
Registered: Feb 2003
Location: Triangle, VA
Posts: 18

Original Poster
Rep: Reputation: 0
Thank you both, I will check out both those possiblities and see which is best for me. im in no rush on doing it cause I can edit just fine now with root locally on the pc just trying to get access on windows so i can use Ultra Edit. Thanks again!

-D
 
Old 06-08-2005, 07:00 AM   #5
dping28
LQ Newbie
 
Registered: Feb 2003
Location: Triangle, VA
Posts: 18

Original Poster
Rep: Reputation: 0
just in case anyone else may be wondering, all I ended up having to do was in the smb.conf file add:

[WWW]
path = /var/www
comment = web files
writable = yes
admin users = user1

and then reloaded samba and it worked fine. no need to mess with any of the permissions. Thanks!
 
  


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
No permission using Apache sanmartin Linux - Networking 2 09-22-2004 01:48 PM
SUSE 9.1 with Apache - You don't have permission... rover Linux - Networking 0 06-27-2004 02:04 PM
Permission problems in Apache matt3333 Linux - Networking 3 05-02-2003 12:21 AM
You don't have permission to access.. apache ?'s jester_69 Linux - General 3 09-06-2002 08:43 AM
apache permission problem Haakon Linux - Newbie 5 12-11-2001 12:58 AM


All times are GMT -5. The time now is 04:13 PM.

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