UNIX Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsOperating SystemsUNIX Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 9th, 2011, 09:09 AM
swg1cor14 swg1cor14 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2011
Posts: 3 swg1cor14 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 m 12 sec
Reputation Power: 0
File permission errors Apache2

My FTP account (and major user account) is piagency. All my files and folders in my /var/www/ is set to piagency as owner and of the www-data group

the user account piagency is part of the www-data group

my php script first creates a directory (if it doesnt exist) then uploads the file to that folder.....or is supposed to.


mkdir("/uploads/" . $_REQUEST['clientID'] . '/video/', 0777);

move_uploaded_file($_FILES['vidfile']['tmp_name'], $filename)

I get mkdir(): No such file or directory

and

failed to open stream: No such file or directory

Weird thing is that i cant delete the video folder and try again. Filezilla says folder is not empty

But it will create the folder

and it will upload the smaller file (there are actually 2 files that get uploaded to same folder)

but the folder says its owner is www-data and group www-data.

But from FTP i cant delete it.

Any ideas?

Reply With Quote
  #2  
Old August 31st, 2011, 08:52 AM
razordave razordave is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2011
Location: Philadelphia, PA, USA
Posts: 4 razordave User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 51 m 29 sec
Reputation Power: 0
It should be "./uploads/" ... When you say "/uploads/" this indicates the uploads folder is in the root directory, but in reality it is in your user directory.

Reply With Quote
  #3  
Old August 31st, 2011, 09:13 AM
swg1cor14 swg1cor14 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2011
Posts: 3 swg1cor14 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 m 12 sec
Reputation Power: 0
Quote:
Originally Posted by razordave
It should be "./uploads/" ... When you say "/uploads/" this indicates the uploads folder is in the root directory, but in reality it is in your user directory.


No its in the root directory. The website displays links to these files for download.

Reply With Quote
  #4  
Old August 31st, 2011, 09:20 AM
razordave razordave is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2011
Location: Philadelphia, PA, USA
Posts: 4 razordave User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 51 m 29 sec
Reputation Power: 0
I think we might have different definitions of root directory. On the web server, the root directory may be /uploads/. However On the filesystem of the server, The directory is probably something like /home/username/public_html/uploads/. My guess is that It is trying to write to /uploads/ on the main filesystem and that does not exist. Could you please verify?

Reply With Quote
  #5  
Old August 31st, 2011, 11:53 AM
swg1cor14 swg1cor14 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2011
Posts: 3 swg1cor14 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 m 12 sec
Reputation Power: 0
/uploads is in the root directory of my website not the home users root. I can't use ./ because this file calling this script is not in the same directory. But the problem is not with it creating the directory. If i delete the directory this script creates it.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > File permission errors Apache2

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap