Announcement

Collapse
No announcement yet.

Latest CageFS 3.2 and .htaccess problems on cPanel server

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Latest CageFS 3.2 and .htaccess problems on cPanel server

    After upgrading CageFS to latest beta I didn notice, that securelinks functionality generated .htaccess files all over the server at nightly upcp run.[br]It was a big mistake enabling this by default as all the sites on the server was down because of it.[br]Additional problem is that using cagefsctl --securelinks-delete is throwing error:[br]
    Code:
    [br]Proceed: /root/.cpanel/datastore/[br]Proceed: /root/.matplotlib/[br]Proceed: /lost+found/[br]Proceed: /backup/[br]Proceed: /home2/[br]Proceed: /home2/xxxxx/[br]Proceed: /home2/xxxxx/.cagefs.screen/[br]Proceed: /home2/xxxxx/.cagefs.tmp/[br]Proceed: /home2/xxxxx/.cagefs.cron/[br]Proceed: /home2/xxxxx/public_html/[br]Traceback (most recent call last):[br] File "/usr/share/cagefs-plugins/create-htaccess.py", line 224, in [br] process(delete = True)[br] File "/usr/share/cagefs-plugins/create-htaccess.py", line 181, in process[br] DeleteFileHtaccessInDirs(path+infile+/, deny_dirs_short)[br] File "/usr/share/cagefs-plugins/create-htaccess.py", line 149, in DeleteFileHtaccessInDirs[br] DeleteFileHtaccessInDirs(need_file, dirs)[br] File "/usr/share/cagefs-plugins/create-htaccess.py", line 149, in DeleteFileHtaccessInDirs[br] DeleteFileHtaccessInDirs(need_file, dirs)[br] File "/usr/share/cagefs-plugins/create-htaccess.py", line 143, in DeleteFileHtaccessInDirs[br] if lines[0].strip()==#CageFS autogenerated file:[br]IndexError: list index out of range[br]Error: /usr/share/cagefs-plugins/create-htaccess.py[br]
    [br][br]And the question is, will
    Code:
    cagefsctl --securelinks-disable
    prevent generating this .htaccesses and index.htmls when
    Code:
    cagefsctl --update
    command is issued?[br]And above error - its a bug or its problem noticed only on my server?[br][br]Anyway, I really like Cloudlinux and CageFS idea. Im using it since few days and I really like it

  • #2
    Yes, "cagefsctl --securelinks-disable" will prevent generating of htaccesses and index.htmls.

    The error while running "cagefsctl --securelinks-delete" is a bug. It will be fixed soon in the next release of CageFS.

    Comment


    • #3
      Thanks for your reply Anton, that explains everything I need to know.

      Comment


      • #4
        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?

        Comment


        • #5
          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.

          Comment


          • #6
            No problem, thanks again for your help.

            Comment


            • #7
              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.

              Comment


              • #8
                please, cure: cagefsctl --securelinks-disable
                To disable it.

                Comment


                • #9
                  > 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

                  Code:
                  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

                  Code:
                  cagefsctl --securelinks-disable
                  so .htaccess files would not generate next time you run

                  Code:
                  cagefsctl --update
                  or during cPanel upcp run.

                  Comment


                  • #10
                    For those following this thread, the above commands didn 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

                    Comment

                    Working...
                    X