Fedora Servers :: F11 & Apache Permissions - Reading Files Out Of The Html Directory
Jun 12, 2009
With F11 installed Apache is having permissions issues reading files out of the html directory. Only wants to work with permissions set to read for other. [Thu Jun 11 23:25:28 2009] [error] [client 127.0.0.1] (13)Permission denied: file permissions deny server access: /var/www/html/index.html Tracked down the permissions issue. Is there a good reason not to change the group to apache and remove world read?
I would like to change the permissions for a directory and all files inside the directory how do I do this? The website is located only on my local network so I am not worried about security. Also what would be the optimal permissions for running wordpress.
Code: include virtual="test.txt" I have tried following the advice in this thread http://ubuntuforums.org/showthread.php?t=1510098 but it makes no difference. The file is there, but the line is delivered to the browser as-is. Using Lucid and a new install of apache 2.2 from the repository.
My setup is two laptops connected by crossover cable. One runs Windows xp the other Fedora 13. Neither is connected to internet. I'm using a subnet of 192.168.1.x On Fedora eth0 is up, apache runs because it creates pidfile. Everything pings fine. Windows xp ip pings fine from command line. Gave Windows xp a static ip of 192.168.1.1 mask 255.255.255.0 and gateway 1.2, same as eth0. xp says it sees the server. eth0 is up.
DirectoryIndex looks at index.html. I created that file with very simple code and put it in document root. Document root permissions are 755. Access_log 770. Error_log 644. Apache User 755. Listen 80 When I type the ip for eth0 (192.168.1.2) into firefox, firefox gives me an error message - can't find server. The connection status says its connected.
The error log includes a line: [warn]./mod_dnssd.c:No services found to register I don't know what this means. Apache is not writing to access_log. When I cat the path to access_log I get nothing, then a command prompt. I'm looking for the part I'm missing that will let Apache serve that index.html file to firefox so I can see how my code looks to firefox as I go.
I have apache working,i have users set under admin group in /home/admin/username/html that is with an html publicfolder at the end, now permissions are set right, /html is set to mode 777, and the contents also inside them. But everytime i do a 10.0.11.25/~les i get a damn forbidden error code, its got me so pissed off and i dont' know whats the problem. This is the error i get: Forbidden 403 You don't have permission to access /~les on this server.
[Tue May 05 19:37:48 2009] [notice] Apache/2.2.11 (Unix) DAV/2 PHP/5.2.6 configured -- resuming normal operations [Tue May 05 20:44:30 2009] [error] [client 10.3.0.254] (13)Permission denied: access to /~les denied
I've just upgraded my serv from fedora8 to fedora12 and got a problem. The httpd and vsftpd add a junk in the beginning of html files. Png, tar and other files are ok. When I make a request to localhost everything is ok.
Code: #telnet localhost 80 GET /1.html <html> </html> but from any other computer.
Code: ..... But this is not an apache problem. When I dl html files from ftp I got the same problem. Iptables is swithed off.
I have FC10 newly installed, and Apache is serving content from /var/www/ okay.
I'm trying to get Apache to serve web content from user's home directories. This is what I've tried with no success:
Uncommented 'UserDir public_htm' in /etc/httpd/conf/httpd.conf and commented out 'UserDir disabled'.
Uncommented user directory section in /etc/httpd/conf/httpd.conf. It now reads as follows: # # Control access to UserDir directories. The following is an example # for a site where these directories are restricted to read-only. #
I also tried setenforce 0 to temporarily disable SELinux until the next reboot. No luck. It doesn't appear to be an SELinux issue.
That's as far as the information available will take me. I still get URL 'Not Found' when I try to access http://192.168.0.2/~myusername/
Something that has been in the pipleline at work for a while is user-based web directories. Main PDCs are running Windows Server 2003 using Active Directory, ideally what would happen is that users have a web share under [URL].. - the server behind this would be Linux (either Fedora or CentOS).
What kind of configuration would be needed for Apache to make this possible? The way I have planned so far is to have the Linux box auth against the AD domain (possibly joined), with Apache setup to share local public_html folders. Not sure how I can get rid of the tilde from the start of the username, but it should be pretty easy.
I want to enable User Directories in Apache. So in httpd.conf I set:
Code: <IfModule mod_userdir.c> #UserDir enabled // commented out UserDir public_html </IfModule> Directory /home/kees is listed has the following file permissions: drwx--x--x 32 kees kees Directory /home/kees/public_html has the following file permissions: drwxr-xr-x 2 root root
Directory public_html has two files: index.html and index.php, both with file permissions: -rwxr-xr-x 1 root root If I now try to open http://myhost/~kees/index.html (or index.php) in my browser I get a 403 Forbidden error. If I look in my error log I see the following messages if I first try to open the index.html and then the index.php file:
I want to enable directory indexing in "/var/www/html/" [dont want to use index.html or something else htm or php file , just want to show all files and folders when browsing http://localhost ] security risk but i damn care about it.
1- Using Fedora 12 2- Apache version 2.2.14-1 .fc12.i686 3- SELINUX=disabled getsebool -a | grep http
Today, the power was suddenly cut off in my house, then my home Ubuntu Server restarted after the power on, but when I use my laptop to view my wesite, the index.html suddenly became blank page, I did clear the firefox cache, doesn't work, still blank, and I changed browser, to seamonkey, the index.html still was blank, so, I am sure that the problem is coused by the server, and then, I put the index.html file to a subdirectory, which under the /var/www/home/index.html, and then I put the address < [url] > ,then,I can view my website the main page index.html.
I'm using FC10 and I want to create a symlink to my movies directory in my home folder:
This is what I did: I created in /var/www/html ln -s /home/username/movies movies
Then in /etc/httpd/conf/httpd.conf DocumentRoot "/var/www/html" <Directory /> Options FollowSymLinks AllowOverride None </Directory>
<Directory "/var/www/html"> Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory>
<Directory "/home/username/movies"> Options Indexes FollowSymLinks Order allow,deny Allow from all </Directory>
Restart apache and then the test page is working.
The directory /home/username/movies has following permissions: drwxrwxrwx 2 apache apache 4096 2009-03-05 23:43 movies When trying to access my webpage at localhost/movies I get the 403 Forbidden Error. Ok then, entering: sudo -u apache ls /var/www/html > movies This works, sudo -u /var/www/html/movies returns the permission denied error. As well sudo -u /home/username/movies Is the user apache chrooted by default? SELinux is in permissive mode. What can I do?
I suspect that this has come up numerous times, but I am new to Linux and I am setting up a new in-house server using Ubuntu 9.04 and Apache, etc. I can see the welcoming "It Works!" message when I log in via Firefox. I can see "index.html" when I FTP the server with the site name and password at /var/www. I can also see the -rw-r-r-- attributes, but I can't edit the HTML file or replace it. When I try to rename the "index.html" file.
I get the following message: "Request denied. Verify that the file or folder exists and that you have the necessary permissions on the server to perform the requested operation."
I haven't been able to determine where to enter the password or what changes I need to make to be able to work with the /var/www directory via FTP.
Alright this works fine to pull the directories/files in the /var/Store/2010/ directory.
But when you click on of the links it tries to http://'serveradress'/$filename
note that $filename in the url is the filename clicked on so the php script is working. but I need it to change to that dir so that you can see the folder/files there and work your way up/down/side wise thru the folder tree to where you need to go. Not try and pop it as a direct url which doesn't work.
I have mod_cgi working perfectly. However, it turns out there are features of mod_perl that I'm trying to use. I have followed all the documentation I can find on using Ubuntu's mod_perl install with Apache2. There seems to be some type of problems with the mod_perl's documentation, as it doesn't work as it's defined. However, I found a modification to make it work, but only is designated directories. If I tried to use in a directory with my other HTML files the regular HTML files will fail.
Using these steps (but using apt-get's install rather than compiling the tar ball). I did as follows:
placed this in the httpd.conf file (which was basically the same as "a2enmod perl".
What is recommended way to set permissions of folders VAR/WWW for use with apache in 11.04? I would like to let the user "ABC" have access to read/write the website files in this directory. How should permissions on these files be set?
the permissions for my home directory were accidentally changed from 'access files' to 'create and delete files', and I changed them back, but ever since then I am not able to change any preferences/settings at all. power management, themes, panels, emerald, anything. my user account is supposed to be the administrator, and all the user privliges are checked. how to get control of my computer back?
This is probably a pretty basic question seeing as I'm pretty new to Ubuntu Server. I'm running a simple website from my Ubuntu Server machine with The files are all stored in /var/www/ and then subdirectories. The problem is that when I add files through FTP I need to go and change all of the file permissions since by default they do not have read access so can't be accessed through a web browser on another machine.How can I make the default permissions readable for the directory and all new files that will be moved in it
I have apache httpd server on my Fedora 10I got 2 problems:First : I copied the web page files to its Document Root <var/www/html> & Disabled the default web page. But when I visit http:/localhost ，it shows up the list of files in <var/www/html> as if a ftp server browsed in web page. So how can I set http://localhost load my default web page index.html ?Second :I want to set up a web server on Internet through my router . I applied for DDNS account & input it into router correctly . I set virtual host in server to redirect any access from port 80 to 192.168.1.2:80 in LAN . Just for in case , I also download and running the DDNS software & installed it on PC 192.168.1.2 in LAN . My DDNS provider is oray.cn . It's a Chinese server provider . I don't think there is anything wrong with oray.cn . But if you need its information just visit oray.cn (Google can translate it for you). So I want to know did I miss something to set up a web server in this kind of situation
I am trying to setup my webserver and I am trying to make a website to run under suexec but somehow I cannot start my apache it directly fails and SELinux is giving me errors and don't really know what to do with it, it is giving me some command to type but not sure if this will make my server less secure. The SELinux error is as follow:
Code: Summary: SELinux prevented httpd reading and writing access to http files.
Detailed Description: SELinux prevented httpd reading and writing access to http files. Ordinarily httpd is allowed full access to all files labeled with http file context. This machine has a tightened security policy with the httpd_unified turned off, this requires explicit labeling of all files. If a file is a cgi script it needs to be labeled with httpd_TYPE_script_exec_t in order to be executed. If it is read-only content, it needs to be labeled httpd_TYPE_content_t, it is writable content. it needs to be labeled httpd_TYPE_script_rw_t or httpd_TYPE_script_ra_t. You can use the chcon command to change these contexts. Please refer to the man page "man httpd_selinux" or FAQ [URL] "TYPE" refers to one of "sys", "user" or "staff" or potentially other script types.
Allowing Access: Changing the "httpd_unified" boolean to true will allow this access: "setsebool -P httpd_unified=1"
Fix Command: setsebool -P httpd_unified=1
I will write down how I did setup my server so maybe you can see a mistake I did. First I changed my Apache httpd.conf I added the following to it: Code: NameVirtualHost 192.168.1.2:80 <VirtualHost 192.168.1.2:80> ServerName localhost DocumentRoot /var/www/html DirectoryIndex index.html index.html index.shtml index.php </VirtualHost>
Then I created the username "ulyaoth" with the group "ulyaoth" as I specified with my suexec, then I created all the directories as specified in my httpd.conf and "chown ulyaoth:ulyaoth (dirname)" them to the right group and username.
I am the IT Manager at a research facility. We have a fairly unique network configuration in order to support all of the different projects we have going on. We have Red Hat, Ubuntu, Windows XP/Vista/7, Windows Servers 2003, Ubuntu servers, Red Hat servers, and even a few Netgear ReadyNAS and Buffalo Terastations. Over the last few years, I have been migrating all of my users and accounts to a single ACL list, which I chose to be a Windows AD 2003 server. 95% of my users work on Windows platforms and just use ssh tunnels to develop on our linux boxes.
However, i ran in to a problem with our Linux boxes not being able to symbolic link on my Windows 2003 file shares. Of course, this is a problem with Windows not supporting symbolic links. I know 2008 does support this feature, but given the economy and the budget restraints, we cannot afford to purchase the updates we would need, so now I am moving all of my shares to a Ubuntu 10.04 server using Samba. I have joined the server to my AD domain successfully, i can login using my AD credentials, and even assign ownership and group permissions using AD users/groups.
Here is my question.
I would like to keep the AD permission schemes intact. I have several shares that contain folders that have individual permission settings. For example, I have a /shared directory that contains about 50 different folders. Some of these folders I allow my users to write data to, some just read, and others I deny access to complete groups and just allow key groups to access (for example, personnel data should only be accessed by the Administrative staff).
Is there a way to make this work?
I can assign uid and gid manually per folder in Samba, but i would like to have the possibility to add multiple users and groups with permissions to folders, which I do not believe can be done with the standard chown commands. Currently, I can see the folder permissions from my Windows box, but when I try to edit the permission settings, it defaults back to full access. So my AD permissions are not being saved.
I have a multi user system for my roommates and myself that has separate folders for each of us. I've got user authentication working with samba, but unless I set every file and folder readable/writeable by all users, I can't browse it or edit the files.This isn't ideal as the shares are open to other users access, so I'm hoping there's a way to keep folders at 750 and files at 660 while allowing samba users to browse, delete and edit.Also, the samba share is actually a mounted NFS share from another server. Both the NFS server and the Samba server have the same users/uid's. When a file is created from a Windows host via the Samba client, the NFS server's permissions do show that the correct user owns the files, but since the files aren't mode 666 but 640 I can't edit or delete the file.
I'm configuring Apache for the first time on this box (8.04 LTS) and Apache2 for the first time ever. "Out of the box" it runs fine and I get the "It Works" page okay. But I'd like to use the virtual site feature to direct Apache to a folder in my user space, and I keep getting errors.
When I point a browser at localhost, the 404 message is "The requested URL / was not found on this server." and the /var/log/apache2/error.log ends with "File does not exist: /htdocs.
Here's my config file from the apache2/sites-available folder:
I diff'ed this file with the default and the only differences are in the DocumentRoot line and the <Directory ...> line.
My public_html folder has permissions 755 and the index.html file is 644.