[Linux-cluster] Permissions in create_dlm_namespace() call ignored

Jeff jeff at intersystems.com
Wed Aug 18 14:01:34 UTC 2004


Wednesday, August 18, 2004, 9:46:45 AM, Patrick Caulfield wrote:

> On Wed, Aug 18, 2004 at 09:16:05AM -0400, Jeff wrote:
>> Assuming that the named DLM namespace does not
>> already exist, the following code should
>> create a namespace which any process on the system
>> can open. However it doesn't work and subsequent
>> processes must be root or else the open_lockspace
>> call fails with

> Odd, it works here:

> dlm_create_lockspace(lsname, 0755);

> # ls -l /dev/misc/
> total 0
> crw-r--r--  1 root root 10, 62 Jun 11 08:20 dlm-control
> crw-------  1 root root 10, 61 Aug 17 13:39 dlm_default
> crwxr-xr-x  1 root root 10, 60 Aug 18 14:44 dlm_testls
> crw-r--r--  1 root root 10, 62 Feb 19 08:38 gdlm

> Have you checked the value of umask ?
> or is SELinux getting in the way ?(eek!)


Apologies for the earlier ls -l output, that was from a user
process, not a root job. It really looks like:
[root at lx3]# ls -l /dev/misc
total 0
crw-r--r--  1 root root 10, 62 Jul 21 06:24 dlm-control
crwxrwxrwx  1 root root 10, 61 Jul 21 06:24 dlm_default
crwxrwxrwx  1 root root 10, 59 Aug 18 09:15 dlm_play
crwxrwxrwx  1 root root 10, 60 Jul 21 06:26 dlm_testls

The problem is that /dev/misc was missing x permission:
drw-rw-rw-  2 root root 4096 Aug 18 09:15 /dev/misc/

Changing this to
drwxrwxrwx  2 root root 4096 Aug 18 09:55 /dev/misc/

allows non-root jobs to connect to namespaces based on
the namespace's permissions.





More information about the Linux-cluster mailing list