LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-13-2012, 01:38 PM   #1
asketchyfish
LQ Newbie
 
Registered: Sep 2012
Posts: 3

Rep: Reputation: Disabled
Question Issues Uploading via Apache to Symbolic Linked Folder


I am currently having an issue where I am trying to upload files from a webpage to a symbolically linked folder (which is a mounted NFS device) that is not under the document root. However, whenever I try and upload a file, it returns that the folder is not able to be found.

I already have FollowSymLinks enabled, and the mounted share is given the same permissions as my apache user at mount time.

Code:
<VirtualHost *:80>
    DocumentRoot "/var/www/admin"
    <Directory "/var/www/admin">
        Options Indexes Includes FollowSymLinks
        AllowOverride all
        Order allow,deny
        allow from all
    </Directory>
    ServerName admin.xyz.com
    ServerAlias admin.xyz.com
    ErrorLog "/var/log/httpd/admin-error.log"
    CustomLog "/var/log/httpd/admin-access.log" common
</VirtualHost>

Code:
lrwxrwxrwx 1 opensnow webadmins     20 Sep 13 12:45 uploads -> /mnt/hut/os_uploads/
 
Old 09-14-2012, 06:51 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
have you created a <directory> definition for that location? Personally I would suggest you *don't* symlink it and instead use an Alias definition - http://httpd.apache.org/docs/2.2/mod...ias.html#alias
 
Old 09-14-2012, 01:05 PM   #3
asketchyfish
LQ Newbie
 
Registered: Sep 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
I switched to aliases over symlinks. Reading the folders is not an issue still, however I am still having issue writing to the directory from PHP uploads.
 
Old 09-14-2012, 02:03 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well if you want help, you need to give us more information than that.
 
Old 09-14-2012, 02:12 PM   #5
asketchyfish
LQ Newbie
 
Registered: Sep 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
When trying to do a PHP file upload I get no errors in my error log, the file is just not created on the server.

Apache is running as user: opensnow with the group webadmins.

This is my /etc/fstab
Code:
nas100.service.softlayer.com:/SLXXX /mnt/hut cifs rwx,hard,intr,exec,uid=opensnow,gid=webadmins,file_mode=0666,dir_mode=0777,username=xxx,password=xxx 0 0
And my httpd.conf
Code:
<VirtualHost *:80>
    DocumentRoot "/var/www/opensnow"
    <Directory "/var/www/opensnow">
        Options Indexes FollowSymLinks Includes
        AllowOverride all
        Order allow,deny
        allow from all
    </Directory>
    Alias /uploads /mnt/hut/os_uploads
    Alias /vanilla/uploads /mnt/hut/os_uploads
    Alias /vanilla/utility/thumbnail /mnt/hut/os_forums/thumbnails
    Alias /js/upload /mnt/hut/os_uploads
    <Directory "/mnt/hut/os_uploads">
        Options Indexes FollowSymLinks Includes
    </Directory>
    <Directory "/mnt/hut/os_forums">
        Options Indexes FollowSymLinks Includes
    </Directory>
    ServerName www.opensnow.com
</VirtualHost>
 
  


Reply



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
[SOLVED] Why do symbolic links retain data of deleted files to which they previously linked lityit Linux - General 2 11-05-2011 10:35 PM
Security issues with having a pub apache folder in home dir. svn post-commit workarou aimbot Linux - Newbie 1 10-18-2009 02:46 PM
[SOLVED] Images not served by apache over a symbolic link folder fakeer Linux - Server 1 01-25-2009 01:16 AM
Can I delete a symbolic link and the file its linked to? mavness Linux - General 4 02-14-2007 01:31 PM
Uncomfortable security issues with Apache Folder Tree Palula Linux - Security 2 07-06-2006 10:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:11 AM.

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
Open Source Consulting | Domain Registration