Skip to content

DSS snap tries to create a logs directory in the current working directory #213

@motjuste

Description

@motjuste

Bug Description

AFAICT, DSS is a strict snap. But, upon running any dss command, it tries to create a logs directory in the current-working-directory from where the command is run. This is not only not expected, it can cause failures if dss does not have access / permissions to write to the current-working-directory.

To Reproduce

  1. sudo snap install data-science-stack --channel 1.0/edge
  2. sudo mkdir /tmp/somewhere
  3. cd /tmp/somewhere
  4. dss - Fails

Environment

  • Ubuntu Jammy
    Linux nvidia-dgx-station-c25989 5.15.0-134-generic #145-Ubuntu SMP Wed Feb 12 20:08:39 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Relevant Log Output

$ dss
Traceback (most recent call last):
  File "/snap/data-science-stack/36/bin/dss", line 5, in <module>
    from dss.main import main
  File "/snap/data-science-stack/36/lib/python3.10/site-packages/dss/main.py", line 4, in <module>
    from dss.create_notebook import create_notebook
  File "/snap/data-science-stack/36/lib/python3.10/site-packages/dss/create_notebook.py", line 19, in <module>
    from dss.remove_notebook import remove_notebook
  File "/snap/data-science-stack/36/lib/python3.10/site-packages/dss/remove_notebook.py", line 8, in <module>
    from dss.utils import does_notebook_exist
  File "/snap/data-science-stack/36/lib/python3.10/site-packages/dss/utils.py", line 21, in <module>
    logger = setup_logger("logs/dss.log")
  File "/snap/data-science-stack/36/lib/python3.10/site-packages/dss/logger.py", line 52, in setup_logger
    os.makedirs(os.path.dirname(log_file_path))
  File "/usr/lib/python3.10/os.py", line 225, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: 'logs'

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions