Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 26th July 2013, 11:39
Ovidiu Ovidiu is offline
Senior Member
 
Join Date: Sep 2005
Posts: 1,262
Thanks: 78
Thanked 24 Times in 20 Posts
Default cannot create folder inside /var/www/clients/clientx/webx/

Not sure why, I'm logged in via SSH and did a sudo su so I'm root yet this happens:

Quote:
root@server:/var/www/clients/client1/web13# mkdir test
mkdir: cannot create directory `test': Permission denied
root@server:/var/www/clients/client1/web13#
Is this by design? I was trying to create a folder that can be accessed via FTP, outside of the web folder. Actually the ultimate goal is to have a symlinked directory not a real folder but when the creation of a symlink failed I tried a folder and to my surprise even that didn't work.

Any ideas why this is happening?
Reply With Quote
Sponsored Links
  #2  
Old 26th July 2013, 13:27
Croydon Croydon is offline
ISPConfig Developer
 
Join Date: Jul 2007
Location: Koblenz, Germany
Posts: 931
Thanks: 16
Thanked 261 Times in 208 Posts
Default

Hi,

this is due to the new security settings in ISPConfig that protect this directory with chattr +i (immutable bit).
If you need to create a folder there you can either temporarily disable the protection with
Code:
chattr -i /var/www/clients/clientX/webY
create the folder and enable the protection again with
Code:
chattr +i /var/www/clients/clientX/webY
.
Second option is to lower the security settings permanently inside ISPConfig in the System -> Server config -> web.
__________________
Marius Cramer

pixcept KG
Reply With Quote
The Following User Says Thank You to Croydon For This Useful Post:
Ovidiu (26th July 2013)
  #3  
Old 26th July 2013, 13:52
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,184
Thanks: 829
Thanked 5,416 Times in 4,258 Posts
Default

Quote:
Is this by design?
yes.

Quote:
I was trying to create a folder that can be accessed via FTP, outside of the web folder.
There is already a folder for that purpose, it is named "private", so no need to create an additional folder.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
Ovidiu (26th July 2013)
  #4  
Old 26th July 2013, 13:57
Ovidiu Ovidiu is offline
Senior Member
 
Join Date: Sep 2005
Posts: 1,262
Thanks: 78
Thanked 24 Times in 20 Posts
Default

Thanks you you both for the answers, public doesn't really fit my needs as I'd prefer for the folder to be a symlink but if that doesn't work, I'll use public :-)
Reply With Quote
  #5  
Old 16th June 2014, 11:32
Ovidiu Ovidiu is offline
Senior Member
 
Join Date: Sep 2005
Posts: 1,262
Thanks: 78
Thanked 24 Times in 20 Posts
Default

What I'M looking to do right now is to create a folder outside of the web folder for an app to safely store its backups accessible by the web server user. Is this possible/feasible?

I tried creating a folder inside i.e. /var/www/clients/client1/web60/ and gave the correct permissions then used chattr -i again but the web server still cannot access that folder.

I've got a feeling this is intended?
Reply With Quote
  #6  
Old 16th June 2014, 16:03
doekia doekia is offline
Junior Member
 
Join Date: Mar 2012
Posts: 28
Thanks: 2
Thanked 9 Times in 8 Posts
Default

The behaviour is by design and can be changed by setting "Security level" to medium on the server config / web.

The "feature" as the bug not to remove the immutable attribute if any.
You need to manually chattr -i to remove it (the settings will then persists whatever change you made)

If you want to maintain security level to high, you need to chattr -i prior been able to do any change on the www/clients/clientX/webY folder and either chattr +i after you made the change or wait until something get changed on the site definition (ISP does it if security level is high)

To make a folder visible as web content, it need to be under web (DOCROOT) regularly or thru symbolic link. You may need on the later to adjust path in the wrapper if you are using fcgid ...

Regards
Reply With Quote
  #7  
Old 16th June 2014, 17:28
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,184
Thanks: 829
Thanked 5,416 Times in 4,258 Posts
Default

Quote:
can be changed by setting "Security level" to medium on the server config / web.
The setting is "web folder protection" and not the security level. security level should never be set to medium on servers that are connected to the internet.

Quote:
What I'M looking to do right now is to create a folder outside of the web folder for an app to safely store its backups accessible by the web server user. Is this possible/feasible?
This folder exists already, it is named "private". so you dont have to alter any security settings or create folders to store data secrely outside of the docroot.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
Ovidiu (18th June 2014)
  #8  
Old 17th June 2014, 07:00
doekia doekia is offline
Junior Member
 
Join Date: Mar 2012
Posts: 28
Thanks: 2
Thanked 9 Times in 8 Posts
 
Default

Quote:
Originally Posted by till View Post
The setting is "web folder protection" and not the security level. security level should never be set to medium on servers that are connected to the internet.
;-) my bad
Reply With Quote
Reply

Bookmarks

Tags
folder, mkdir, permission

Thread Tools
Display Modes

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help: protect /web (site) folder with user and password blustem General 7 22nd February 2013 20:06
Samba folder access problem Tray2 Server Operation 2 29th April 2012 08:35
I want to run a backup script, what folder would be best to place it in? chaloum General 8 20th March 2012 16:08
Don't create stats folder when create a website quannv Server Operation 3 12th July 2008 11:36
Create imap folder alex916 Installation/Configuration 12 9th April 2007 21:04


All times are GMT +2. The time now is 12:50.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.