Skip to content
Snippets Groups Projects
Commit 3464d602 authored by Daniel Nemergut's avatar Daniel Nemergut
Browse files

WS-121 Delivery directory permission fix

parent 6b4dd932
No related branches found
No related tags found
1 merge request!1228WS-121 Delivery directory permission fix
Pipeline #8367 passed
Pipeline: workspaces

#8370

    ......@@ -15,6 +15,7 @@
    #
    # You should have received a copy of the GNU General Public License
    # along with Workspaces. If not, see <https://www.gnu.org/licenses/>.
    import getpass
    import pathlib
    from typing import Dict
    ......@@ -48,9 +49,10 @@ class SharedWebDestination(DestinationDecorator):
    # Open permissions on the username dir for the group so both vlapipe and almapipe can make delivery dirs
    user_path = pathlib.Path(capo.downloadDirectory) / username
    user_path.chmod(0o2775)
    for p in user_path.rglob("*"):
    p.chmod(0o2775)
    if user_path.owner() == getpass.getuser():
    user_path.chmod(0o2775)
    for p in user_path.rglob("**"):
    p.chmod(0o2775)
    # generate the download URL for later usage
    self.download_url = f"{capo.downloadUrl}/{username}{'/'+ prefix if prefix else ''}/{context.token()}"
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment