Results 1 to 10 of 12
Hi,
I recently installed an Apache Web Server in my SuSE Linux, and managed to open the ://localhost page. When I type this page, it says `It works!` on the ...
- 01-29-2011 #1Just Joined!
- Join Date
- Nov 2010
- Posts
- 18
Apache Web Server Path Problem
Hi,
I recently installed an Apache Web Server in my SuSE Linux, and managed to open the ://localhost page. When I type this page, it says `It works!` on the screen. The problem is that I cannot find my localhost folder, therefore I cannot edit the page
. Could somebody please tell me where i can find that folder, so I can make my own files? Also, I searched through the Internet to get a solution, but someone said these folder is in the path /var/www/ . But the problem is I don`t have a folder named /www/ under the /var/ directory. What can I do to fix this? I`m new in Linux and in Apache Web Server, any help would be great!
- 01-29-2011 #2
On Suse the directory should be /srv/www/htdocs.
- 01-29-2011 #3Just Joined!
- Join Date
- Nov 2010
- Posts
- 18
Thanks, I found the file. But there is still another problem. I cannot copy a .html extension file into htdocs folder. It says `permission denied`. Also, it doesn`t let me do something in the file; for example it didn`t let me change the current index.html file, and also it didn`t let me delete that file. I managed to delete index.html writing the command to delete it, but still it doesn`t let me copy another files which i wrote in the text editor into the htdocs. What should I do?
- 01-30-2011 #4
Thats because you do not have permissions to write to that directory as a normal user. One option to resolve that problem is to (as root) create a group e.g. webdev, put yourself (normal userid) in the group and then change the group ownership of /srv/www and its contents to webdev.
- 01-30-2011 #5Just Joined!
- Join Date
- Nov 2010
- Posts
- 18
I created a group called webApache in User and Group Management in YaST2. After that, i wrote chown -R webApache: /srv/www/htdocs/ in terminal. But it said " chown: invalid spec: 'webApache:' ". So, I couldn't change the owner of the directory although I created "webApache" group.
v What is the problem here?
- 01-30-2011 #6
The way I'd do it as root
I'd greate a group e.g. webdev in the above example. Change the group ownership of /srv/www/htdocs and the directories and files in it, to the newly created webdev group. After that I'd then add a user to the webdev group.Code:groupadd webdev chgrp -R webdev /srv/www/htdocs gpasswd -a yourUserID webdev
- 01-30-2011 #7Just Joined!
- Join Date
- Nov 2010
- Posts
- 18
I wrote the first two lines, but there is a problem with the third line it seems -a is considered invalid by the terminal. What does `-a` stand for? I wrote gpasswd --help and the valid options were;
-r Remove the password for this group
-l Locks the password entry for "group"
-u Try to unlock the password entry for "group"
--service srv Use nameservice 'srv'
-D binddn Use dn "binddn" to bind to the LDAP directory
-P path Search group file in "path"
--help Give this help list
--usage Give a short usage message
--version Print program version
--stdin Receive input from stdin instead of /dev/tty
Valid services for -r are: files, nis, nisplus, ldap
which one do i need to use?
- 01-30-2011 #8
It seems like SUSE uses a different version of gpasswd than whats on my Fedora system. Instead of using gpasswd try,
Code:usermod -a -G webdev yourUserID
- 01-31-2011 #9Just Joined!
- Join Date
- Nov 2010
- Posts
- 18
Terminal didn`t accept -a again. It said it was invalid. Also, gpasswd is to create a group password, if I understood it correctly, right? So, I wrote just `gpasswd webdev` in the terminal. After that, it asked me to create a new group password. So, I created one. Given the situation, it seems like I created a group with a password. So, do I need to add users to the new created group? What is the next step that I need to take?
- 01-31-2011 #10
Like I said above, openSUSE seems to be using a different version of gpasswd than whats used on RedHat/Fedora and Debian systems. You use it to create groups, but on RedHat/Fedora, Debian and their derivatives, you also use it to add users to groups. Can you post the output of the command in my last post. If you are struggling a bit, try using YaST to create the new group, add yourself to the group and then just run the second command in post 6 of this thread.


Reply With Quote