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

openindiana: non-existing runtime dir #8186

Open
ThomasWaldmann opened this issue Apr 9, 2024 · 2 comments
Open

openindiana: non-existing runtime dir #8186

ThomasWaldmann opened this issue Apr 9, 2024 · 2 comments
Labels
help wanted os: other not Linux and not an OS we have another label for
Milestone

Comments

@ThomasWaldmann
Copy link
Member

ThomasWaldmann commented Apr 9, 2024

master branch:

test_socket_permissions and test_with_socket fail because they run into permission denied for the runtime dir (guess they can't create a directory below /run/).

@ThomasWaldmann ThomasWaldmann added the os: other not Linux and not an OS we have another label for label Apr 9, 2024
@ThomasWaldmann ThomasWaldmann added this to the 2.0.0rc1 milestone Apr 9, 2024
@ThomasWaldmann
Copy link
Member Author

    openindiana64: path = '/run/user/100/pytest', mode = 511, pretty_deadly = True
    openindiana64:
    openindiana64:     def ensure_dir(path, mode=stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO, pretty_deadly=True):
    openindiana64:         """
    openindiana64:         Ensures that the dir exists with the right permissions.
    openindiana64:         1) Make sure the directory exists in a race-free operation
    openindiana64:         2) If mode is not None and the directory has been created, give the right
    openindiana64:         permissions to the leaf directory. The current umask value is masked out first.
    openindiana64:         3) If pretty_deadly is True, catch exceptions, reraise them with a pretty
    openindiana64:         message.
    openindiana64:         Returns if the directory has been created and has the right permissions,
    openindiana64:         An exception otherwise. If a deadly exception happened it is reraised.
    openindiana64:         """
    openindiana64:         try:
    openindiana64:             os.makedirs(path, mode=mode, exist_ok=True)
    openindiana64:         except OSError as e:
    openindiana64:             if pretty_deadly:
    openindiana64: >               raise Error(str(e))
    openindiana64: E               borg.helpers.errors.Error: Error: [Errno 13] Permission denied: '/run'
    openindiana64:
    openindiana64: src/borg/helpers/fs.py:40: Error

@ThomasWaldmann
Copy link
Member Author

ThomasWaldmann commented Apr 9, 2024

There is no /run on openindiana:

total 1025
lrwxrwxrwx   1 root     root           9 März 29 16:49 bin -> ./usr/bin
drwxr-xr-x  10 root     sys           26 März 29 16:58 boot
drwxr-xr-x 247 root     sys          250 Apr.  9 18:10 dev
drwxr-xr-x   4 root     sys            5 Apr.  9 18:10 devices
drwxr-xr-x  83 root     sys          228 Apr.  9 18:11 etc
drwxr-xr-x   3 root     sys            3 Okt. 27 16:10 export
dr-xr-xr-x   1 root     root           1 Apr.  9 18:11 home
drwxr-xr-x  21 root     sys           21 März 29 16:44 kernel
drwxr-xr-x  12 root     bin          183 Apr.  9 18:14 lib
drwxr-xr-x   2 root     root           3 März 29 16:44 media
drwxr-xr-x   2 root     sys            2 März 29 16:49 mnt
dr-xr-xr-x   1 root     root           1 Apr.  9 18:11 net
drwxr-xr-x   2 root     sys            2 März 29 16:49 opt
drwxr-xr-x   5 root     sys            5 Okt. 27 16:10 platform
dr-xr-xr-x  52 root     root      480032 Apr.  9 18:49 proc
drwx------   3 root     root           7 Apr.  9 18:14 root
drwxr-xr-x   3 root     root           3 März 29 16:44 rpool
drwxr-xr-x   2 root     sys           56 März 29 16:58 sbin
drwxr-xr-x   5 root     root           5 Okt. 27 16:10 system
drwxrwxrwt  13 root     sys         1991 Apr.  9 18:35 tmp
drwxr-xr-x  38 root     sys           51 März 29 16:58 usr
drwxr-xr-x   3 root     root           3 Apr.  9 18:11 vagrant
drwxr-xr-x  40 root     sys           40 März 29 16:52 var

There is /var/run though:

vagrant@openindiana:~$ ls -l /var
total 57
drwxrwxr-x   9 root     sys           15 März 29 16:54 adm
drwxr-xr-x   3 root     sys            3 Okt. 27 16:10 apache2
drwxr-xr-x   2 root     sys            2 Okt. 27 16:10 audit
drwxr-xr-x   6 root     bin            6 Okt. 27 16:10 cache
drwxr-xr-x   2 root     sys            2 Okt. 27 16:10 cores
drwxr-xr-x   2 root     sys            3 März 29 16:52 cron
drwxr-xr-x   3 root     sys            3 Okt. 27 16:10 db
drwxr-xr-x   2 root     sys            2 Okt. 27 16:10 empty
drwxr-xr-x   3 root     sys            3 Okt. 27 16:10 fm
drwxr-xr-x   2 root     bin            2 Okt. 27 16:10 games
drwxr-xr-x   2 daemon   daemon         2 Okt. 27 16:10 idmap
drwxr-xr-x   2 root     sys            2 Okt. 27 16:10 inet
drwxr-xr-x   2 root     sys            3 März 29 16:48 info
drwxr-xr-x   3 root     sys            3 Okt. 27 16:10 krb5
drwxr-xr-x   3 root     bin            5 März 29 16:48 ld
drwxr-xr-x   2 root     sys            2 Okt. 27 16:10 ldap
drwxr-xr-x   4 root     sys            4 Okt. 27 16:11 lib
drwxr-xr-x   5 root     sys            8 Okt. 27 16:10 log
drwxr-xr-x   2 root     bin            2 Okt. 27 16:10 logadm
drwxrwxrwt   3 root     mail           3 Okt. 27 16:10 mail
drwxr-xr-x   2 root     bin            2 Okt. 27 16:10 news
drwxr-xr-x   4 root     bin            4 Okt. 27 16:10 nfs
drwxr-xr-x   3 root     sys            3 Okt. 27 16:10 ntp
drwxr-xr-x   4 openldap openldap       4 Okt. 27 16:10 openldap
drwxr-xr-x   2 root     sys            2 Okt. 27 16:10 opt
drwxr-xr-x  10 root     root          13 Apr.  9 18:14 pkg
drwxrwxrwt   2 root     bin            2 Okt. 27 16:10 preserve
drwxr-xr-x   4 root     sys            4 Okt. 27 16:10 rsyncd
drwxr-xr-x  10 root     sys         2087 Apr.  9 18:16 run
drwxr-xr-x   6 root     sys            6 März 29 16:50 sadm
drwxr-xr-x   3 root     bin            4 Okt. 27 16:10 saf
drwxr-xr-x   3 root     sys            4 März 29 16:48 smb
drwxr-xr-x   9 root     bin            9 Okt. 27 16:10 spool
drwxr-xr-x   5 root     sys            5 Okt. 27 16:10 svc
drwxrwxrwt   3 root     sys            3 Apr.  9 18:35 tmp
drwxr-xr-x   5 root     sys            5 Okt. 27 16:10 tpm
drwx------   3 root     smmsp          3 März 29 16:52 user
drwxr-xr-x   3 root     bin            5 Okt. 27 16:10 yp

There is no /var/run/user/... though.

So, guess this is a bug / missing platform support of platformdirs.

@ThomasWaldmann ThomasWaldmann changed the title openindiana: socket-related test failures openindiana: non-existing runtime dir Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted os: other not Linux and not an OS we have another label for
Projects
None yet
Development

No branches or pull requests

1 participant