Re: not able to write file in directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The user you are running apache under needs to have write access to that directory.

Igor

On Sep 16, 2011 7:35 AM, "Rajeev Prasad" <rp.neuli@xxxxxxxxx> wrote:
> hello,
> I have my site config as below on ubuntu:
>  
> I am running a perl cgi which is trying to write a file under /var/www/testwebsite.com/www/data folder, but i am getting error like this:
>  
>  [error] [client xxxxx] could not open /var/www/testwebsite.com/www/data/testfile: Permission denied, referer: ....
>  
> the script and folder everything is owned by same ubuntu user.
>  
> when i run the script from command prompt i get no error, files are created successfully.
>  
> I have also tried to save the files to /var/www/testwebsite.com/data folder but that also failed.(gave same error)
>  
> plz. help.
>  
> here is the site config:
>  
> <VirtualHost *:80>
>     ServerName testwebsite.com
>     ServerAlias www.testwebsite.com
>     ServerAdmin admin@xxxxxxxxxxxxxxx
>     ServerSignature Off
>     DocumentRoot /var/www/testwebsite.com/www
>     <Directory />
>         Options +FollowSymLinks
>         AllowOverride None
>     </Directory>
>     <Directory /var/www/testwebsite.com/www/>
>         Options +FollowSymLinks +MultiViews +Includes
>         AllowOverride None
>         Order allow,deny
>         allow from all
>     </Directory>
>     ScriptAlias /cgi-bin/ /var/www/testwebsite.com/cgi-bin/
>     <Directory "/var/www/testwebsite.com/cgi-bin/">
>         AllowOverride None
>         Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch +Includes
>         AddHandler cgi-script cgi pl                #was added
>         Order allow,deny
>         Allow from all
>     </Directory>
>     ErrorLog ${APACHE_LOG_DIR}/error.log
>     # Possible values include: debug, info, notice, warn, error, crit,
>     # alert, emerg.
>     LogLevel warn
>     CustomLog ${APACHE_LOG_DIR}/access.log combined
>     Alias /doc/ "/usr/share/doc/"
>     <Directory "/usr/share/doc/">
>         Options Indexes MultiViews FollowSymLinks
>         AllowOverride None
>         Order deny,allow
>         Deny from all
>         Allow from 127.0.0.0/255.0.0.0 ::1/128
>     </Directory>
>     DirectoryIndex /cgi-bin/index.pl
> </VirtualHost>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
> " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux