Latest CageFS 3.2 and .htaccess problems on cPanel server
Forum
  1. Forums
  2. CloudLinux and Control Panels
  3. CloudLinux and cPanel
  1. Marcin Kedzia
  2. 18.04.2012
  3.  Subscribe via email
After upgrading CageFS to latest beta I didn\'t notice, that securelinks functionality generated .htaccess files all over the server at nightly upcp run.
It was a big mistake enabling this by default as all the sites on the server was down because of it.
Additional problem is that using cagefsctl --securelinks-delete is throwing error:

Proceed: /root/.cpanel/datastore/
Proceed: /root/.matplotlib/
Proceed: /lost+found/
Proceed: /backup/
Proceed: /home2/
Proceed: /home2/xxxxx/
Proceed: /home2/xxxxx/.cagefs.screen/
Proceed: /home2/xxxxx/.cagefs.tmp/
Proceed: /home2/xxxxx/.cagefs.cron/
Proceed: /home2/xxxxx/public_html/
Traceback (most recent call last):
File \"/usr/share/cagefs-plugins/create-htaccess.py\", line 224, in <module>
process(delete = True)
File \"/usr/share/cagefs-plugins/create-htaccess.py\", line 181, in process
DeleteFileHtaccessInDirs(path+infile+\'/\', deny_dirs_short)
File \"/usr/share/cagefs-plugins/create-htaccess.py\", line 149, in DeleteFileHtaccessInDirs
DeleteFileHtaccessInDirs(need_file, dirs)
File \"/usr/share/cagefs-plugins/create-htaccess.py\", line 149, in DeleteFileHtaccessInDirs
DeleteFileHtaccessInDirs(need_file, dirs)
File \"/usr/share/cagefs-plugins/create-htaccess.py\", line 143, in DeleteFileHtaccessInDirs
if lines[0].strip()==\'#CageFS autogenerated file\':
IndexError: list index out of range
Error: /usr/share/cagefs-plugins/create-htaccess.py


And the question is, will
cagefsctl --securelinks-disable
prevent generating this .htaccess\'es and index.html\'s when
cagefsctl --update
command is issued?
And above error - it\'s a bug or it\'s problem noticed only on my server?

Anyway, I really like Cloudlinux and CageFS idea. I\'m using it since few days and I really like it ;)
Rate this post:
  1. 18.04.2012 08:04:29
  2. # 1
Anton Volkov Accepted Answer
Posts: 47
Joined: 03.04.2012
0
Votes
Undo
Yes, \"cagefsctl --securelinks-disable\" will prevent generating of htaccess\'es and index.html\'s.

The error while running \"cagefsctl --securelinks-delete\" is a bug. It will be fixed soon in the next release of CageFS.
  1. 18.04.2012 11:04:17
  2. # 2
Marcin Kedzia Accepted Answer
Posts: 7
Joined: 18.04.2012
0
Votes
Undo
Thanks for your reply Anton, that explains everything I need to know.
  1. 18.04.2012 19:04:11
  2. # 3
Marcin Kedzia Accepted Answer
Posts: 7
Joined: 18.04.2012
0
Votes
Undo
There is one more problem. After new account is created under cpanel, one \"cagefs deny from all\" .htaccess file is created in /home/USER so it makes www not working for that user.
Can you point me out how to get rid of this behavior? Is there any config option/template to remove this behavior?
  1. 19.04.2012 01:04:03
  2. # 4
Anton Volkov Accepted Answer
Posts: 47
Joined: 03.04.2012
0
Votes
Undo
Please remove file .htaccess from /root/cpanel3-skel and /etc/skel directories.
These skeleton directories are copied to home directories of newly created users.

We will exclude these paths from generating .htaccess automatically in the next release of CageFS.
Thank you for patience and understanding.
  1. 19.04.2012 03:04:46
  2. # 5
Marcin Kedzia Accepted Answer
Posts: 7
Joined: 18.04.2012
0
Votes
Undo
No problem, thanks again for your help.
  1. 24.04.2012 12:04:11
  2. # 6
Ryan Smith Accepted Answer
Posts: 5
Joined: 10.04.2012
0
Votes
Undo
Is running cagefsctl --securelinks-delete the best way to clean up all the .htaccess files that CageFS 3.2b2 installed all over my system? I keep finding things that these .htaccess files are breaking.
  1. 24.04.2012 13:04:34
  2. # 7
Igor Seletskiy Accepted Answer
Posts: 1194
Joined: 09.02.2010
0
Votes
Undo
please, cure: cagefsctl --securelinks-disable
To disable it.
  1. 24.04.2012 16:04:33
  2. # 8
Marcin Kedzia Accepted Answer
Posts: 7
Joined: 18.04.2012
0
Votes
Undo
Ryan Smith wrote:
Is running cagefsctl --securelinks-delete the best way to clean up all the .htaccess files that CageFS 3.2b2 installed all over my system? I keep finding things that these .htaccess files are breaking.


Yes, you can run
cagefsctl --securelinks-delete
without any problems to cleanup the system from .htaccess files created by cagefs.
Then as Igor stated you can disable this functionality with
cagefsctl --securelinks-disable
so .htaccess files would not generate next time you run
cagefsctl --update
or during cPanel upcp run.
  1. 01.05.2012 16:05:31
  2. # 9
Ryan Smith Accepted Answer
Posts: 5
Joined: 10.04.2012
0
Votes
Undo
For those following this thread, the above commands didn\'t totally clean up everything, but this one below will do the trick (requires latest CageFS)

/usr/share/cagefs-plugins/create-htaccess.py --ignore-exclusions --delete-old
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!
Guest
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below. Supports gif,jpg,png,zip,rar,pdf
• Insert • Remove Upload Files (Maximum File Size: 2 MB)
Captcha
To protect the site from bots and unauthorized scripts, we require that you enter the captcha codes below before posting your question.