Permissions for Data Directory

Permissions for Data Directory

by George Self -
Number of replies: 4
I'm installing Moodle on a shared hosted server am having some problems with the data directory. I see that I need to "restrict all file access to your group (to prevent other webhost customers from look at or changing your files), but provide full read/write access to everyone else (which will allow the web server to access your files)." Huh? I'm working with a Linux installation. Does this mean that I set permissions for the group to 0 and others to 6? What about the user? I'm thinking this means doing a chmod 606 for my data directory. Am I in the right ballpark here?
Average of ratings: -
In reply to George Self

Re: Permissions for Data Directory

by George Self -
I just now set the permissions to 707 and it seems to work fine. Since the directory is outside the www directory and I've included an .htaccess file I believe I'll be OK, security-wise. --George
In reply to George Self

Re: Permissions for Data Directory

by George Self -

This reply is for Warlito Vicente, who posted below. Something happened to your post and I do not have a "reply" button for it, so I'll answer here.

I also had the same error message you got. You will need to create a directory called moodledata in your root folder and then set permissions for that directory to 707. I was able to do all of that with my FTP client software (WS-FTP), even though I'm on a hosted service. I also placed an .htaccess file in that directory, following the guidance in the installation guide. Once I did all of that I quit getting that error message.

--George

In reply to George Self

Re: Permissions for Data Directory

by Warlito Vicente -
hi george:
am unable to create an .htaccess file in w2k. i tried creating an "htaccess" file in win2k, uploaded to a linux webhosting server - tried renaming it to ".htaccess" without success.
_____________________
for now, the error messages have been reduced to:
wwwroot/theme/$CFG->theme" ?>/favicon.ico" />
Upgrading database 
spacer.gif

(postgres7): CREATE TABLE mdl_blocks ( id SERIAL8 PRIMARY KEY, name varchar(40) NOT NULL default '', version INT8 NOT NULL default '0', cron INT8 NOT NULL default '0', lastcron INT8 NOT NULL default '0', visible int NOT NULL default '1')  

Warning: pg_exec(): Query failed: ERROR: Unable to locate type name 'serial8' in catalog . in /usr/local/sites/mra-acup.com/htdocs/moodle/lib/adodb/drivers/adodb-postgres64.inc.php on line 687
-1: ERROR: Unable to locate type name 'serial8' in catalog
            
         
      
   

Error

wwwroot/theme/$CFG->theme" ?>/favicon.ico" />
Blocks tables could NOT be set up successfully!

Continue


(postgres7): SELECT * FROM mdl_course WHERE category = '0' LIMIT 1  

You are not logged in. (Login)

In reply to George Self

Re: Permissions for Data Directory

by Warlito Vicente -
Am having a problem configuring the data directory, too..
Note that I have already setup the data directory outside of the webhosting folder.
Getting the following error:
Warning: mkdir(/mra-acup.com/moodledata): No such file or directory in /usr/local/sites/mra-acup.com/htdocs/moodle/lib/moodlelib.php on line 1407

ERROR: You need to create the directory /mra-acup.com/moodledata with web server write access

wwwroot/theme/$CFG->theme" ?>/favicon.ico" />
Upgrading database 
spacer.gif

(postgres7): CREATE TABLE mdl_blocks ( id SERIAL8 PRIMARY KEY, name varchar(40) NOT NULL default '', version INT8 NOT NULL default '0', cron INT8 NOT NULL default '0', lastcron INT8 NOT NULL default '0', visible int NOT NULL default '1')  

Warning: pg_exec(): Query failed: ERROR: Unable to locate type name 'serial8' in catalog . in /usr/local/sites/mra-acup.com/htdocs/moodle/lib/adodb/drivers/adodb-postgres64.inc.php on line 687
-1: ERROR: Unable to locate type name 'serial8' in catalog
            
         
      
   

Error

wwwroot/theme/$CFG->theme" ?>/favicon.ico" />
Blocks tables could NOT be set up successfully!