Koozali.org: home of the SME Server

Public-safe storage of Drupal data when Drupal installed in ibay

Offline bloodshoteye

  • *****
  • 232
  • +0/-0
  • Grateful thanks to SME devs
Hi all,

Firstly, I've looked through the forums, but because I'm not sure how to phrase this question I may have missed the answer.

I have a Drupal 6.0 installed in an ibay (I know, it's better in /opt, but for various reasons it's in an ibay).
Now, what I'm trying to achieve is to point Drupal to a secure area, say /opt/druplData.
I tried:
Quote
db accounts setprop <ibay_name> PHPBaseDir /opt/drupalData/
signal-event ibay-modify <ibay_name>
to show Drupal where to go, but even though the directory physically exists, Drupal says "Can't find /opt/drupalData"

Is there maybe another way of doing this or providing a safe place elsewhere on the system for Drupal data - moving the Drupal install is not an option at this time.

Cheers,
SME Server is a fantastic product - thank you!

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Public-safe storage of Drupal data when Drupal installed in ibay
« Reply #1 on: April 30, 2009, 06:35:03 PM »
what about permissions on dir/files?

and, naturally, did you search with google? this could help you

Ciao
Stefano

Offline bloodshoteye

  • *****
  • 232
  • +0/-0
  • Grateful thanks to SME devs
Re: Public-safe storage of Drupal data when Drupal installed in ibay
« Reply #2 on: May 01, 2009, 12:00:55 AM »
Hi Stefano a.k.a. nenonano, thanks for your reply.

Quote
what about permissions on dir/files?
I had set /opt/drupalData 777, but Drupal said "coudln't find", not "can't write".
Changing permissions manually for an ibay isn't permanent across reconfigures and reboots.

Quote
and this could help you
It did, but not for my issue, thanks. It's for moving sites around - not what I need right now which is simply allowing the website to write files to a private area, if that's possible

Quote
did you search with google?
Yes, the search results are well and good, but SME works differently.
I'm currently evaluating "Private Upload" module for Drupal. Maybe this will provide a workable solution.
I'll report back.

Cheers
SME Server is a fantastic product - thank you!

Offline gzartman

  • *
  • 306
  • +0/-0
    • LEI Engineering & Surveying
Re: Public-safe storage of Drupal data when Drupal installed in ibay
« Reply #3 on: May 09, 2009, 05:46:50 PM »
Moving to SME 7.x Contribs, as it is more appropriate there.
----
Greg J. Zartman
LEI Engineering & Surveying

SME user and community member since 2000.

Offline soprom

  • *
  • 589
  • +0/-0
    • www.logiciel-libre.org
Re: Public-safe storage of Drupal data when Drupal installed in ibay
« Reply #4 on: May 10, 2009, 05:51:23 PM »
What permissions did you set for the drupal's i-bay?
like admin group, read/write...
Sophie from Montréal

Offline soprom

  • *
  • 589
  • +0/-0
    • www.logiciel-libre.org
Re: Public-safe storage of Drupal data when Drupal installed in ibay
« Reply #5 on: May 10, 2009, 05:56:35 PM »
From the FAQ, the command should look like this:

db accounts setprop ibayname PHPBaseDir /opt/druplData:/tmp/:/home/e-smith/files/ibays/ibayname/
signal-event ibay-modify ibayname

Sophie from Montréal

Offline soprom

  • *
  • 589
  • +0/-0
    • www.logiciel-libre.org
Re: Public-safe storage of Drupal data when Drupal installed in ibay
« Reply #6 on: May 10, 2009, 06:04:53 PM »
Drupal doc says:
Quote
Download settings are configured in Administer >> Site Configuration>> File system

There are two possible settings for download method: Public and Private.

Set to Public if you don't care if any user, even anonymous users, can download the files uploaded by other users.

Set to Private if you wish to restrict the ability of some users to download files uploaded by other users.

If permissions for i-bay are set like admin-group read-write (or web_group read/write), then Drupal could handle this.

Also, it explains (http://drupal.org/node/344806) that a way to go is to create a user and use its /home to store files. The Drupal new "files system" will look like
/home/e-smith/files/users/drupal/home/files.

« Last Edit: May 10, 2009, 06:11:30 PM by soprom »
Sophie from Montréal

Offline soprom

  • *
  • 589
  • +0/-0
    • www.logiciel-libre.org
Re: Public-safe storage of Drupal data when Drupal installed in ibay
« Reply #7 on: May 10, 2009, 06:21:28 PM »
I just tested the permissions problem that you talked about and permissions are preserved after reconfiguring...
Sophie from Montréal

Offline bloodshoteye

  • *****
  • 232
  • +0/-0
  • Grateful thanks to SME devs
Re: Public-safe storage of Drupal data when Drupal installed in ibay
« Reply #8 on: May 11, 2009, 10:33:44 AM »
@soprom

Thanks for your wise words.
Initially I was a bit confused because the PHPBaseDir option I tried didn't work. Now I see why. This lead me to try other options with ibay group and user access settings.
When I set "group=admin" with "User access via file sharing or user ftp = Write=group, Read = everyone", Drupal could write to /sites/files (desired result), but kept reporting sites/default and sites/default/settings.php was insecure.

I'm trying this at the moment (nontraditional, I expect) - created cronjobs to run every 30 min:
Quote
chmod 2755 /home/e-smith/files/ibays/edu/html/sites/default and chmod 0444 /home/e-smith/files/ibays/edu/html/sites/default/settings.ph
30 mins of insecurity will only occur once after a reboot, so surely can't be much of a problem.

Cheers,    
SME Server is a fantastic product - thank you!