Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved Cron - Permission Denied

    LAMP
    2
    6
    51
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      JLX89 last edited by

      Hello All,
      I've got some weird things going on with permissions on cron jobs. Permissions are showing as "permission denied" in the logs. I've gone through and verified that the permissions on the files are www-data and have restarted the app a few times but the issue seems to persist. Any help with this would be greatly appreciated!

      Feb 14 09:05:40 /bin/sh: 1: /app/data/software-name/crons/cron.php: Permission denied
      
      5    *    *    *    * /app/data/software-name/crons/cron.php
      5    *    *    *    * /app/data/software-name/mail-pipe.php
      
      1 Reply Last reply Reply Quote 0
      • nebulon
        nebulon Staff last edited by

        Can you ensure that the file is executable? You can ensure that with chmod +x /app/data/software-name/crons/cron.php

        J 1 Reply Last reply Reply Quote 0
        • Topic has been marked as a question  nebulon nebulon 
        • J
          JLX89 @nebulon last edited by

          @nebulon thanks for following up! I've posted the result below:

          /app/data/software-name/crons# chmod +x cron.php -v
          mode of 'cron.php' retained as 0755 (rwxr-xr-x)
          
          1 Reply Last reply Reply Quote 0
          • nebulon
            nebulon Staff last edited by

            Hm how are the permissions of the folder itself?

            ls -l /app/data/software-name/crons

            J 1 Reply Last reply Reply Quote 0
            • J
              JLX89 @nebulon last edited by

              @nebulon said in Cron - Permission Denied:

              ls -l /app/data/software-name/crons

              /app/code# ls -l /app/data/software-name/crons
              total 184
              -rw-r--r-- 1 www-data www-data 8283 Nov 29 12:08 bootstrap.php
              -rw-r--r-- 1 www-data www-data 787 Nov 29 12:08 config.php
              -rwxr-xr-x 1 www-data www-data 30920 Nov 29 12:08 cron.php
              -rw-r--r-- 1 www-data www-data 11926 Nov 29 12:08 functions.php
              -rw-r--r-- 1 www-data www-data 40 Nov 29 12:08 index.php
              -rwxr-xr-x 1 www-data www-data 40693 Nov 29 12:08 pipe.php
              -rw-r--r-- 1 www-data www-data 72201 Nov 29 12:08 pop.php

              1 Reply Last reply Reply Quote 0
              • nebulon
                nebulon Staff last edited by

                Seems fine, not sure what the root cause is then. You could give us remote SSH access to take a direct look https://docs.cloudron.io/support/#remote-support and send us a mail to support@cloudron.io with your dashboard domain.

                1 Reply Last reply Reply Quote 0
                • Topic has been marked as solved  J JLX89 
                • First post
                  Last post
                Powered by NodeBB