I have an nfs mount created on a Linux server, and a process that is creating directories and files dynamically as it runs. As expected, the directories have an owner:group
of nobody:nogroup
.
The issue is that the default umask is yielding permissions like this:
drwxr-x--- 2 nobody nogroup 4096 Sep 6 20:17 /shares/dra/rman/ORCL/mtd_inputs_2024-08-27/scott/datafile
That directory is created by a client on another Linux server, by an Oracle RMAN job. It later invokes an Oracle DDL command to create an Oracle Directory object, that allows Oracle to access that Linux directory.
I am getting errors when the RMAN tries to access directories in that hierarchy. When googled, those errors has some hits on Oracle support, including this note That note leads me to think that perhaps the Oracle Directory object can't access the directories since there is no "world" access.
The directories are created dynamically during the RMAN job so I can't change permissions in advance.
The task is a long-running one, and right toward the end, it creates a new directory and apparently a child process attempts to access it, and I'm pretty sure it is due to the directory permissions.
Is there a way to change the default umask to yield directory permissions to be 777
for the nobody
user ID? I can't change it on the client user ID.
The entry for nobody in /etc/password shows a non-existent home directory and /usr/sbin/nologin shell:
Prompt> grep nobody /etc/passwd
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
Versions:
Prompt> uname -a
Linux project01 4.19.0-26-amd64 #1 SMP Debian 4.19.304-1 (2024-01-09) x86_64 GNU/Linux
Prompt> cat /etc/debian_version
10.13
The client is running Oracle Linux Server release 7.9.
Update: My entry for the server in question in /etc/exports looks like this:
Prompt> grep /shares/dra /etc/exports
/shares/dra exampledev01(rw,sync,no_subtree_check,all_squash,anonuid=65534,anongid=65534)
all_squash
to the appropriate line in/etc/exports
? What doesexports
look like atm?all_squah
and hopefully I clarified the process flow.all_squash
NFS export option: it forces the ownership of all files tonobody:nogroup
, even if the client user is notnobody
nor a member of thenogroup
group. If the umask precludes world-access (like the default umask of Oracle Enterprise Manager/GridControl), it results in files that are inaccessible to the client user after initial write.