vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Forum and Server Management (https://vborg.vbsupport.ru/forumdisplay.php?f=232)
-   -   Safe Mode / Attachments (https://vborg.vbsupport.ru/showthread.php?t=211090)

xpla 04-13-2009 04:49 PM

Safe Mode / Attachments
 
I know that this was topic of some threads. In my case there's a dedicated server available running php as cgi and all files are chown to the appropriate user. I don't want to deactivated Safe Mode but can't change to filesystem storing.

Is there a workaround for storing attachments in the filesystem if Safe Mode is enabled but running PHP as CGI and suexec?

snakes1100 04-13-2009 10:02 PM

It doesnt matter if the server is running php as a cgi.

Just ad the path as noted in the admincp when setting the safe_mode options.

Angel-Wings 04-14-2009 08:34 AM

And it's still not possible - at least with Vbulletin - to use the filesytem for storing attachments when safe mode is enabled.
The problem is that VB creates several directories where the attachments get stored and when safe mode is enabled, the directories may be successfully created, but they can't be accessed.
A workaround would be to edit the PHP files that all attachments get stored in the same directory, without such a modification you'll need to use the Database as storage. :(

xpla 04-14-2009 08:52 AM

My server is configured that permission won't be a problem, so it's just a limitation of vbulletin :( Thanks for the replies.

snakes1100 04-14-2009 12:06 PM

Quote:

Originally Posted by Angel-Wings (Post 1790879)
And it's still not possible - at least with Vbulletin - to use the filesytem for storing attachments when safe mode is enabled.

That is an incorrect statement.

If you have the paths set correctly and permissions set correctly, there is no issue to use the file system for storage when safe_mode is enabled.

xpla 04-14-2009 12:13 PM

He performs a check if safe-mode is enabled. So he blocks the attempt to move the files from database to filesystem.

snakes1100 04-14-2009 01:25 PM

If this is a dedicated server as you stated in your 1st post, then have your system admin or host correct the issue.

There are no limitations when running safe_mode & filesystem storage, the files go directly to the file system, not to the db, then the file system, there is only a marker i nthe db to state were the file is on the file system.

Angel-Wings 04-17-2009 02:41 AM

Quote:

Originally Posted by snakes1100 (Post 1790979)
If you have the paths set correctly and permissions set correctly, there is no issue to use the file system for storage when safe_mode is enabled.

Yes - it completely is incorrect without any doubt because it's even incorrectly stated here http://www.vbulletin.com/docs/html/m...rage_db_to_fs1

Ever looked how the "uploads" directory looks like ? It's a dir with several sub directories and again sub directories that PHP creates. Now you'll maybe see the problem with "Safe Mode" and accessing directories PHP created itself.

snakes1100 04-18-2009 03:03 AM

Quote:

Originally Posted by Angel-Wings (Post 1792996)
Yes - it completely is incorrect without any doubt because it's even incorrectly stated here http://www.vbulletin.com/docs/html/m...rage_db_to_fs1

Ever looked how the "uploads" directory looks like ? It's a dir with several sub directories and again sub directories that PHP creates. Now you'll maybe see the problem with "Safe Mode" and accessing directories PHP created itself.


Im sorry, but you are again incorrect, if the server permissions & ownership are correct, there is no issue storing images in the file system & the server running in safe_mode, if you would like me to prove you wrong with your own server, i can show you if you like?

Angel-Wings 04-18-2009 10:07 PM

Images != attachments ;)

If you talk about customavatars / customsignaturpics and these directories, that's a single directory.
Attachments or how VB calls it the "uploads" directory - there PHP is called to create a directory structure where the attachments are stored. When Safe Mode is enabled the user running those PHP scripts differs from the User the Webserver is running under so Safe Mode prevents file operations in these directories.
If the user running the PHP scripts doesn't differ from the use the Webserver is running under - let's call that user "dummy" and both PHP and IIS / Apache run as user "dummy" there're for sure other problems than storing attachments in the filesystem or the database.
Let this user own the PHP scripts - sorry - who's doing such stupid things should care about some much more important things first than thinking about where to store attachments.

So yes - feel free to show me how you can bypass Safe Mode - I'll even create a directory with a 777 directory but sorry if I won't change any user / group owners and activate PHP's chown / chmod / system and all the other calls nobody should have activated on it's server.


All times are GMT. The time now is 11:48 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01027 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete