Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rights problem on incoming directory #487

Open
matthieumarrast opened this issue Sep 16, 2024 · 1 comment
Open

rights problem on incoming directory #487

matthieumarrast opened this issue Sep 16, 2024 · 1 comment

Comments

@matthieumarrast
Copy link
Contributor

Our system administrators created an ftp user with the mfdata incoming directory (/home/mfdata/var/in/incoming) as the HOME dir.

We face the below error on the switch plugin:

Traceback (most recent call last):
  File "/opt/metwork-mfdata-2.2/bin/before_start_step.switch.main", line 21, in <module>
    os.chmod(path, st.st_mode | stat.S_IWGRP)
PermissionError: [Errno 1] Operation not permitted: '/home/mfdata/var/in/incoming'

I don't know if they installed metwork/mfdata before or after creating the ftp user. After I suppose, otherwise the rights would not have been modified.
So it appears the rights of the incoming dir are not "mfdata:metwork":

root@server in$ ll
total 0
drwxrwxr-x+ 2 userftp users    6  7 août  12:40 incoming

While installing mfdata, is it possible to chown the incoming directory (and/or all the wached directories) to mfdata:metwork if it already exists !?

@thebaptiste
Copy link
Contributor

thebaptiste commented Sep 16, 2024

I think it's done already :

   {% if MFMODULE == "MFDATA" %}
        mkdir -p /home/{{MFMODULE_LOWERCASE}}/var/in >/dev/null 2>&1
        chown -R {{MFMODULE_LOWERCASE}}:metwork /home/{{MFMODULE_LOWERCASE}}/var >/dev/null 2>&1
        chmod g+rX /home/{{MFMODULE_LOWERCASE}} >/dev/null 2>&1
        chmod g+rX /home/{{MFMODULE_LOWERCASE}}/var >/dev/null 2>&1
        chmod g+rX /home/{{MFMODULE_LOWERCASE}}/var/in >/dev/null 2>&1
    {% endif %}

in _metwork.spec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants