PhotoPost Photo Gallery Sales PhotoPost Sales Toll Free Phone Number
Mon-Fri 9am-4pm EST
  PhotoPost Photo Sharing Photo Gallery    Visualize community tm
| | | | | | | | |
Old December 10th, 2004, 02:06 PM   #1 (permalink)
Member
Verified Customer
 
Join Date: Oct 2004
Location: Florida
Posts: 318
Chmod issues and Safe Mode

Just a point of observation:

I run my server in Safe Mode.

I also run my PhP scripts in the name of the user account rather than nobody. (This is done with PhpSUexec compiled into Apache.)

While running the Gallery scripts, the data directory can be chmod 755 and the photo files can be chmod 644.

It is the script that is writing the file, not the outside person doing the upload. (The script is running under the name of the server account holder.)

For security's sake, I avoid chmod 777 where ever possible. After changing the data directory (1) to chmod755, I note that a new photo uploaded still comes in at chmod 777. I would like to change that portion of the script that deals with this chmod assignment.

This may only be true of Linux in Safe Mode, so your mileage may vary.
oldengine is offline   Reply With Quote
Old December 10th, 2004, 03:53 PM   #2 (permalink)
Brian
Guest
 
Posts: n/a
Re: Chmod issues and Safe Mode

If you'll search your gallery/upload.php file and forum/includes/functions_gallery_imageedit.php file for 0777 then you can change the values there.
  Reply With Quote
Old December 10th, 2004, 04:59 PM   #3 (permalink)
Ultimate Member
 
Join Date: Jan 2004
Posts: 2,196
Re: Chmod issues and Safe Mode

If it is your own personal server, that you own and no one else is on, why in gods name do you run in safe mode? it is the most crippling thing in the world you can do
Zachery is offline   Reply With Quote
Old December 10th, 2004, 05:58 PM   #4 (permalink)
Member
Verified Customer
 
Join Date: Oct 2004
Location: Florida
Posts: 318
Re: Chmod issues and Safe Mode

It is my personal server and after reading about all the benefits of safe mode, I fell into line along with many others. No one ever told me that I was crippling my server to turn it on. In fact, to the best of my knowledge, it runs rather well. A Dell dual Xeon on a fiber network can't be screwed up too badly. Of course, I am always open to more information about making it run better.
oldengine is offline   Reply With Quote
Old December 10th, 2004, 08:23 PM   #5 (permalink)
Ultimate Member
 
Join Date: Jan 2004
Posts: 2,196
Re: Chmod issues and Safe Mode

safe mode is too restitive to php in some means, you wont be able to use alot of the better server optmization vB features has like storing css so users can cache it instead of being displayed inline, and storing attachments in the filesystem instead of the database.
Zachery is offline   Reply With Quote
Old December 10th, 2004, 09:40 PM   #6 (permalink)
Member
Verified Customer
 
Join Date: Oct 2004
Location: Florida
Posts: 318
Re: Chmod issues and Safe Mode

Quote:
Originally Posted by Brian
If you'll search your gallery/upload.php file and forum/includes/functions_gallery_imageedit.php file for 0777 then you can change the values there.
This works fine at 755 in upload.php and 644 in functions_gallery_imageedit.php

The results produce:

Directory: (Can have a no-linking .htaccess file in here.)
drwxr-xr-x 3 user user 4096 Dec 10 22:16 photos/

Sub Directory: (created by gallery user number)
drwxr-xr-x 2 user user 4096 Dec 10 22:23 1/

Files:
-rw-r--r-- 1 user user 41653 Dec 10 22:23 fjrod.jpg
-rw-r--r-- 1 user user 2617 Dec 10 22:23 fjrod_thumb.jpg

I noticed that GD can not produce a .gif thumbnail as expected. This is no problem as jpegs are fine. Writing to another system user's directory didn't go so well. It was a nice thought for automated backups, but too much hassle.

So far, it's looking and working great! Happy Customer!
oldengine is offline   Reply With Quote
Old December 12th, 2004, 08:51 AM   #7 (permalink)
Junior Member
Verified Customer
 
Join Date: Jul 2004
Posts: 16
Re: Chmod issues and Safe Mode

Ive been experiencing folder creation problems too. Pretty much due to my host not allowing chmod 777 rights, basically I cannot allow the execute attribute.

I tried what was mentioned above, but still im unable to have the script create a folder and file.

I noticed the following line when validating uploaded files from the AdminCP.

Quote:
Warning: unlink(D:l3d-design.netwwwrootgalleryfiles//fi_gilles_and_rene_410156.wmv)[function.unlink.html]:No such file or directory in D:\l3d-design.net\wwwroot\forum\includes\functions_gallery.php on line 977

Warning: unlink(D:l3d-design.netwwwrootgalleryfiles//fi_gilles_and_rene_410156.wmv)[function.unlink.html]:No such file or directory in D:\l3d-design.net\wwwroot\forum\includes\functions_gallery.php on line 988
Now im guessing that simply because although somewhere in the database the file location etc.. has been entered, the physical aspect hasnt.

Any ideas how I can overcome this?
Simplicity is offline   Reply With Quote
Old December 12th, 2004, 09:52 AM   #8 (permalink)
Brian
Guest
 
Posts: n/a
Re: Chmod issues and Safe Mode

Would you mind submitting a support ticket so I can have a look and see what can be done to allow those folders to be created?
  Reply With Quote
Old December 12th, 2004, 10:32 AM   #9 (permalink)
Junior Member
Verified Customer
 
Join Date: Jul 2004
Posts: 16
Re: Chmod issues and Safe Mode

Brian, there is actually no need. I decided to re-install a fresh copy, didnt worry about fixing any code. Then looked at the path to the 'files' folder (which I thought was weird listed as D:l3d-design.netwwwrootgalleryfiles), simply added a few / in the appropriate places and for now seems to be working correctly.

If any code modifications bring back the problem then I will let you know, but im pretty certain it was the path that was entered, im sure I had the slashes put in there though :S

Only thing I need to sort out now is the red-X thumbnails created for media files, im sure Ive seen that posted here... *clicks the search button*

Thanks anyway
Simplicity is offline   Reply With Quote
Old December 12th, 2004, 10:53 AM   #10 (permalink)
Brian
Guest
 
Posts: n/a
Re: Chmod issues and Safe Mode

Ahhh, that could do it. If you copied the path the it most likely had \ marks instead of /, which would have been stripped out when you saved the options.
Unless I'm forgetting something, I can't think of any currently known bugs that would cause x's to be displayed for media files. If you can't find anything and would like me to take a look though I'll be more than happy to do so.
  Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Safe Mode Gliderstyle Classifieds Installation & Upgrades 1 October 25th, 2005 09:01 AM
Safe Mode Question WB General Discussion 5 February 8th, 2005 01:58 PM
Safe Mode Off - am I screwed? NW_Jim Photopost Pro Installation & Upgrades 5 January 7th, 2005 06:06 PM
[RC1] Safe Mode? Kirby Installs and Upgrade - vBulletin 3.0.X 4 December 9th, 2004 11:25 PM
Safe Mode Michael Blake Before You Buy 2 September 20th, 2004 05:26 AM


All times are GMT -5. The time now is 01:26 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0