Moodle
  1. Moodle
  2. MDL-15870

Flat file enrolments - file not being deleted

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.9.1
    • Fix Version/s: None
    • Component/s: Enrolments
    • Labels:
      None
    • Environment:
      CentOS Linux 4.6 (x86_64)
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_19_STABLE
    • Rank:
      2132

      Description

      Flat file enrolment enabled and directory set in Moodle admin interface. Set emails to come to admins.
      Flat file directory is owned by apache (Moodle runs under apache user).
      Flat CSV file placed in directory.
      Every 5 minutes (under cron), the file is found.

      WHAT WAS EXPECTED

      • The file should be deleted.

      WHAT ACTUALLY HAPPENS

      • The file is not deleted. It stays there.

      Email messages received every 5 minutes:

      "Important error: Enrolment file"
      The text file you are using for file-based enrolments
      (/home/moodle19/enrolments) can not be deleted by the cron process. This
      usually means the permissions are wrong on it. Please fix the permissions so
      that Moodle can delete the file, otherwise it might be processed repeatedly.

      "Flatfile Enrolment Log"
      Tuesday, 29 July 2008, 12:56 PM
      Flatfile enrol cron found file: /home/moodle19/enrolments
      Error unlinking file /home/moodle19/enrolments

      I've tried

      • setting extremely permissive permissions (eg chmod -R a+w)
      • fully and recursively chowning the directory to apache user and group

      No joy. File stays.

        Activity

        Hide
        Marcus Leonard added a comment -

        PS: the cron job runs as apache.

        Show
        Marcus Leonard added a comment - PS: the cron job runs as apache.
        Hide
        Marcus Leonard added a comment -

        I hate it when I finally work it out just after I log the issue.
        I specified the location as the directory, not the actual file name. When the email notification said it had found it, I assumed it was correct.

        This can be closed, but, suggestion: if it's looking for a file, it should not accept a directory. Maybe change this?

        Show
        Marcus Leonard added a comment - I hate it when I finally work it out just after I log the issue. I specified the location as the directory, not the actual file name. When the email notification said it had found it, I assumed it was correct. This can be closed, but, suggestion: if it's looking for a file, it should not accept a directory. Maybe change this?
        Hide
        Séverin Terrier added a comment -

        I don't see how to do what you say :

        • /home/moodle19/enrolments could be a file name
        • when you specify the file, it doesn't exist, or could not exist

        I have a problem related : same message saying that file couldn't be deleted. BUT, in my case, it IS deleted...

        Show
        Séverin Terrier added a comment - I don't see how to do what you say : /home/moodle19/enrolments could be a file name when you specify the file, it doesn't exist, or could not exist I have a problem related : same message saying that file couldn't be deleted. BUT, in my case, it IS deleted...
        Hide
        Marcus Leonard added a comment -

        Things are working now. I can't remember the specific details of this, but I suspect it may have been the permissions on the folder that the file was in.
        I think just close this issue.
        Cheers,

        • Marcus
        Show
        Marcus Leonard added a comment - Things are working now. I can't remember the specific details of this, but I suspect it may have been the permissions on the folder that the file was in. I think just close this issue. Cheers, Marcus
        Hide
        Michael de Raadt added a comment -

        Thanks for reporting this issue.

        We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported.

        If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed.

        Michael d;

        lqjjLKA0p6

        Show
        Michael de Raadt added a comment - Thanks for reporting this issue. We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported. If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed. Michael d; lqjjLKA0p6
        Hide
        Michael de Raadt added a comment -

        I'm closing this issue as it appears to have become inactive and is probably not relevant to a current supported version. If you are encountering this problem or one similar, please launch a new issue.

        Show
        Michael de Raadt added a comment - I'm closing this issue as it appears to have become inactive and is probably not relevant to a current supported version. If you are encountering this problem or one similar, please launch a new issue.

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: