![]() This is commonly used for /tmp, /var/run and other file systems that should be empty following a reboot. If you want to create a file system in memory, there is the tmpfs file system. If it is deleted on the first logout, then it is likely a cleanup script run on logout. If the file sticks around, then it is unlikely a process running as the user or a crontab entry. Try logging in several times without logging out and checking for the file. Check for: processes running as the user cronjobs running as the user or scripts run a during login/logout. If files for a particular user are being removed from /dev/shm it will be either that user or root that is removing them. The permissions should be drwxrwxrwxt which prevents other users other than root from removing the files. ![]() If you have a kernel that mounts /dev/shm, then it should be listed as such in /etc/mtab. This prevents shared memory from being lost if the programs using them crash or otherwise exit without cleaning up. Depending on the mode they were created with, shared memory segments may be removed when no processes are using them. Shared memory is intended to be used by co-operating programs to allow access to shared data structures. There are system calls to create, use, and delete shared memory segments. dev/shm provides a view of the shared memory that appears like a file system. Oracle: 3.5 Database Installation and Operation Fails if RemoveIPC=yes Is Configured for systemd.Change default value of RemoveIPC in nf.RemoveIPC prematurely removes IPC segments.In my case, I went with option #2 because the user was already Edit /etc/systemd/nf, uncomment the line RemoveIPC=yes, change it to RemoveIPC=no, save, and reboot the.Create the files with/for a system user - a user created with the system option ( adduser -r or adduser -system).In my case, the files and directories were being created for a user Systemd to clean up interprocess communication (IPC) for "userĪccounts" who aren't logged in. RemoveIPC option is set to yes by default. The /etc/systemd/nf containsĭefault configuration options, with each of them commented out. # monitor unlink() and rmdir() system calls.Ĭan someone explain what is going wrong here?Īfter hours of searching and reading, I found the culprit. I have tried auditd with the following rules, but no luck: # This file is automatically generated from /etc/audit/rules.d I've tried to monitor the file, strace on sshd, etc. I've observed is that all the files corresponding to that particular user are getting deleted from /dev/shm, even if that is a tree of directories, containing files. tail: '/dev/shm/sample' has become inaccessible: No such file or directory On box1, tailf shows that the file has been deleted. Do step 3 again, and this time I don't see the file.On box2, do ssh "ls -l /dev/shm/" -rw- 1 user user 1 Aug 25 17:12 sample On a RHEL 7.2 machine, if I create a POSIX shared memory in a console session, then query its presence in /dev/shm from an SSH session, it shows the shared memory file during the first time, but after that it gets deleted mysteriously.įinally I've broken down the test case to the following steps:
0 Comments
Leave a Reply. |