Discussion Forums  >  Self Hosted Control Panels

Replies: 11    Views: 275

Stormy2022
Lost but trying
Profile
Posts: 13
Reg: Dec 31, 2014
New Orleans
830
01/09/15 06:05 PM (9 years ago)

Files directory exists but is not writable

Continuing on with AWS self-hosting, I come across this issue while installing BT. "The /var/www/html/BT-server/files directory exists but is not writable. PHP needs write-access to this directory. For techies, that means chmod 0755. For others, contact your webserver's administrator " I granted the dir 775, and even 777 permissions - no dice. I also tried chown -R myuser:myuser /var/www/html/BT-server. I'm not sure what else to try. For unrelated reasons, I had to go with a RHEL server. Previously I had this same issue on Ubuntu, and managed to get past it - but I dont remember how, or if my work-around doesnt apply to RHEL. Not really a linux guy. What else can I do here?
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
01/09/15 06:43 PM (9 years ago)
You may end up needing to let those permissions 'cascade' into the directory, so that it changes not only the directory, but any files and subdirectories within. Some FTP Programs (like FileZilla) will allow you to do this. I can't remember who it was, but there is a BT'er using Self Hosted on AWS. If I can recall their handle, I'll reach out and see if they can comment on the situation. Cheers! -- Smug
 
Stormy2022
Lost but trying
Profile
Posts: 13
Reg: Dec 31, 2014
New Orleans
830
like
01/09/15 08:07 PM (9 years ago)
I did apply the permissions recursively, though the directory is empty on install. I'm using this guide where possible: https://www.buzztouch.com/files/howtos/RDs_Updated_EC2_Self-hosting_Guide.pdf
 
Stormy2022
Lost but trying
Profile
Posts: 13
Reg: Dec 31, 2014
New Orleans
830
like
01/09/15 08:32 PM (9 years ago)
duplicate post..
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
01/09/15 08:57 PM (9 years ago)
Research Department. That's who it was. Have you tried sending a private message? They may be able to provide some suggestions... https://www.buzztouch.com/ResearchDepartment Cheers! -- Smug
 
Stormy2022
Lost but trying
Profile
Posts: 13
Reg: Dec 31, 2014
New Orleans
830
like
01/11/15 02:12 PM (9 years ago)
I haven't, however, his doc was on using AWS Ubuntu. I am using AWS RHEL. The permission differences between the two linux distros, at least as provided on AWS, is enough to stop me in my tracks - I'm not sure Research Dept will be able to offer anything specific to my situation. I really need a linux/php pro to look this over i think. Looking at the install_2.php code, my issue is here: $filePath = "../files"; if(is_dir($filePath)){ if(is_writable($filePath)){ [...] }else{ $bolPassed = false; $strMessage .= "<br>The " . $path . "<b>/files</b> directory exists but is not writable. PHP needs write-access to this directory. For techies, that means chmod 0755. For others, contact your webserver's administrator"; } I've tried: - chmod 777 on www, html, BT-server, and files directories. - chown apache, ec2-user, and root for the same directories. - verified php is NOT running in Safe mode. - uploaded files dir from my AWS ubuntu installation (which is working). - restarted apache a few times throughout.. Perhaps I'm missing some dependency in php? Here's a comparison of my working (ubuntu) phpinfo, and the not working (RHEL) phpinfo. Ubuntu http://ec2-54-148-69-115.us-west-2.compute.amazonaws.com/test.php RHEL http://ec2-54-186-226-185.us-west-2.compute.amazonaws.com/test.php Anything stand out?
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
01/11/15 07:08 PM (9 years ago)
That's a lot of info to compare. What I would suggest is saving them both as text files, and comparing them using 'diffmerge'. https://sourcegear.com/diffmerge/ This will allow you to see every single difference between the two files, highlighted for easy noticibility. Let us know if it gets you any further. If not, we can revisit. Cheers! -- Smug
 
Stormy2022
Lost but trying
Profile
Posts: 13
Reg: Dec 31, 2014
New Orleans
830
like
01/11/15 07:26 PM (9 years ago)
I can see the differences easy enough.. most relate to the different versions of php, their related components, and linux - which is not a problem onto itself. The problem is, I still wouldn't know what (missing) is actually causing the write to folder issue.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
01/11/15 07:35 PM (9 years ago)
And you're certain that these values are correct in your config.php file? define("APP_PHYSICAL_PATH", "YOUR_APP_PHYSICAL_PATH"); define("APP_DATA_DIRECTORY", "/files"); define("APP_THEME_PATH", "/files/theme"); App Physical Path is the biggie; everything else hinges off of that. Cheers! -- Smug PS, you won't usually edit data and theme; if your physical path is correct, they will also be correct by default.
 
Stormy2022
Lost but trying
Profile
Posts: 13
Reg: Dec 31, 2014
New Orleans
830
like
01/11/15 07:45 PM (9 years ago)
Yep, the config is setup the same way as my working instance. define("APP_PHYSICAL_PATH", "/var/www/html/BT-server"); define("APP_DATA_DIRECTORY", "/files"); define("APP_THEME_PATH", "/files/theme"); This is where BT is installed.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
01/11/15 08:01 PM (9 years ago)
You may need to talk to either Danny Kessels, or someone in tech support at the host. All things being equal, if the configuration is correct, then it 'should' work. There is just some detail somewhere that isn't quite right. Whether that is something you can attend to, or needs to be attended by the host, I couldn't say. Good Luck on that, and let us know how it goes. Fingers are crossed! Cheers! -- Smug
 
Stormy2022
Lost but trying
Profile
Posts: 13
Reg: Dec 31, 2014
New Orleans
830
like
01/14/15 10:07 PM (9 years ago)
Figured it out. The culprit turned out to be a SElinux. To prevent SELinux from blocking the www/ directory the following command had to be issued. chcon -R --type=httpd_sys_rw_content_t www/
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.