Go Back   vb.org Archive > Community Discussions > Forum and Server Management
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 04-13-2009, 04:49 PM
xpla xpla is offline
 
Join Date: Jul 2008
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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?
Reply With Quote
  #2  
Old 04-13-2009, 10:02 PM
snakes1100 snakes1100 is offline
 
Join Date: Dec 2001
Location: Michigan
Posts: 3,733
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 04-14-2009, 08:34 AM
Angel-Wings's Avatar
Angel-Wings Angel-Wings is offline
 
Join Date: Sep 2007
Posts: 206
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 04-14-2009, 08:52 AM
xpla xpla is offline
 
Join Date: Jul 2008
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My server is configured that permission won't be a problem, so it's just a limitation of vbulletin Thanks for the replies.
Reply With Quote
  #5  
Old 04-14-2009, 12:06 PM
snakes1100 snakes1100 is offline
 
Join Date: Dec 2001
Location: Michigan
Posts: 3,733
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Angel-Wings View Post
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.
Reply With Quote
  #6  
Old 04-14-2009, 12:13 PM
xpla xpla is offline
 
Join Date: Jul 2008
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

He performs a check if safe-mode is enabled. So he blocks the attempt to move the files from database to filesystem.
Reply With Quote
  #7  
Old 04-14-2009, 01:25 PM
snakes1100 snakes1100 is offline
 
Join Date: Dec 2001
Location: Michigan
Posts: 3,733
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #8  
Old 04-17-2009, 02:41 AM
Angel-Wings's Avatar
Angel-Wings Angel-Wings is offline
 
Join Date: Sep 2007
Posts: 206
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by snakes1100 View Post
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.
Reply With Quote
  #9  
Old 04-18-2009, 03:03 AM
snakes1100 snakes1100 is offline
 
Join Date: Dec 2001
Location: Michigan
Posts: 3,733
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Angel-Wings View Post
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?
Reply With Quote
  #10  
Old 04-18-2009, 10:07 PM
Angel-Wings's Avatar
Angel-Wings Angel-Wings is offline
 
Join Date: Sep 2007
Posts: 206
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
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 On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:04 AM.


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.04676 seconds
  • Memory Usage 2,252KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete