Friday, April 26, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 4643  / 2 Years ago, sun, october 9, 2022, 5:12:35

In my Ubuntu deployment script I have written a function to secure shared memory. For a web server it's important to secure the shared memory to tighten up security. Below you can find the code:



echo "tmpfs       /dev/shm     tmpfs   tdefaults,noexec,nosuid        0 0" >> /etc/fstab


When I reboot the web server it gets stuck. I can't see where it goes wrong. Do you have an idea, please let me know.


More From » ram

 Answers
1

Unless theres's a typo in your question, I think you're options are off. First, don't specify 'defaults' (or tdefaults, as you have it.. Here's the output of my shm directory taken from cat /proc/mounts:



none /run/shm tmpfs rw,nosuid,nodev,relatime 0 0


Note that on my ubuntu (12.10) it is mounted in /run and not /dev, although I doubt that matters. Try changing your string to



echo "tmpfs /dev/shm tmpfs rw,nosuid,nodev,relatime 0 0" >> /etc/fstab



and see what happens.


[#32669] Monday, October 10, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
tisglitter

Total Points: 307
Total Questions: 103
Total Answers: 119

Location: Bosnia and Herzegovina
Member since Thu, Jun 24, 2021
3 Years ago
tisglitter questions
Sun, Jan 9, 22, 16:18, 2 Years ago
Wed, Jun 1, 22, 18:03, 2 Years ago
Fri, Dec 10, 21, 14:31, 2 Years ago
;