Noexec on /home


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Noexec on /home
# 1  
Old 04-10-2015
Noexec on /home

Hi all,

I read in some documents that it is advised to use the mount option noexec also on /home. I can live with a nosuid but since I am writing scripts in /home and also execute them for testing etc., it is very annoying if I would be forced to copy the scripts all the time to /tmp for executing them.
Sadly in my current environment, admins are using noexec on /home as a standard setting on every box.

So from my view, noexec on /home is a tad too much.
Does anyone of you have experience with this in your environment or is there a mere explicit example, why this is ok and should be a "must have"?

Thanks in forward.
# 2  
Old 04-10-2015
None as i see it.

You can still execute the script like bash script.sh, ignoring the noexec option completely.

Perhaps other members will shed more light on usage, but i don't see it securing anything special.
This User Gave Thanks to Peasant For This Post:
# 3  
Old 04-10-2015
The only situation I can think of where this might be useful is a shared webhosting environment with ssh access. In this case the admins might want you not to execute any stuff not provided by the hoster.

But to make this work, there must not be one single place on any not noexec'd filesystem where the user has write access, or he can run his programs from there.

Also, as Peasant pointed out, for shell scripts there is a trivial workaround.
This User Gave Thanks to hergp For This Post:
# 4  
Old 04-10-2015
Just work around it.

And rejoice in the plausible deniability it provides you should you ever want to run something they'd deem illicit. In order to nail you for that, they'd first have to demonstrate their own incompetence:

"I thought you had configured our systems so no one would be able to run unapproved apps?"

"Well, we don't know what we're doing."

"Oh, but we should trust your claims about what zaxxon did?"
This User Gave Thanks to achenle For This Post:
# 5  
Old 04-10-2015
Hey guys,
thanks all for your answers. Proves that I didn't really seem to miss something crucial so far. Anyway as you said "work around it" is they way I will have to go since talking/discussion is futile.

I got an official answer but no explanation at all. Security is a killer argument here and it is applied generously here and they simply wait if someone starts to moan under this heavy blanket.
Anything else is looked at like as if it was heresy and I am getting tired of it Smilie

Have a nice weekend all!
# 6  
Old 04-10-2015
Hang on, hang on -- they have noexec on home and don't have it on tmp? tmp is world-writable for goodness sake.

I have the opposite situation, noexec on /tmp/, normal home folders. I also have /boot mounted read-only, which was necessary to avoid an injection attack until the real vulnerability was discovered.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Debugging a script with noexec

Newbie question. I cannot get "set -n" or "set -noexec on" to work on Linux or AIX! According to the man page and what I read online, it should inform me of syntax errors without executing commands in your script. So, can someone PLEASE explain why this does not work? ... (2 Replies)
Discussion started by: fgoyti
2 Replies

2. Red Hat

“noexec” and “nosuid”

I would like mimic "noexec” and “nosuid” on /tmp security when its a seperate file system BUT I would like to hang /tmp directly off of / "root". Any suggestions would be helpful. (1 Reply)
Discussion started by: trscam
1 Replies

3. Shell Programming and Scripting

cp -p /home/* home/exp/*.date not working please help

:( ---------- Post updated at 01:51 AM ---------- Previous update was at 01:50 AM ---------- Not working ---------- Post updated at 02:04 AM ---------- Previous update was at 01:51 AM ---------- cp -p /home/* home/exp/*.`date` i am using this (4 Replies)
Discussion started by: rishiraaz
4 Replies

4. Solaris

how to change /export/home/user dir to /home /user in solaris

Hi all i am using solaris 10, i am creating user with useradd -d/home/user -m -s /bin/sh user user is created with in the following path /export/home/user (auto mount) i need the user to be created like this (/home as default home directory ) useradd -d /home/user -m -s /bin/sh... (2 Replies)
Discussion started by: kalyankalyan
2 Replies

5. Programming

how to simulate "mkdir -p /home/blah1/blah2/blah3" in "c" where only /home exist

I'm trying to make use of mkdir(char *pathname, S_IRWXU) to create the directories. but it only creates one directory at a time. so I have to separate the tokens for "/home/blah1/blah2/blah3" as "home blah1 blah2 blah3" using delimiter "/", but it is again hectic to create such directory... (8 Replies)
Discussion started by: platinumedge
8 Replies

6. Programming

Getting Home Directory

Hi I need to get the home directory of current user who is running the program, also i need to store the value in a particular variable and pass to the function. thanks in advance (4 Replies)
Discussion started by: cutechaps
4 Replies

7. High Performance Computing

CRAY comes home for you.....

Isn't it annoying to leave work hanging to the next day because the regular home pc will never have the grunt of your HPC system at work. CRAY have answered someone's prayers ..... Cray Inc., The Supercomputer Company - CX1 Deskside Personal Supercomputer Cheers, Cam :) (3 Replies)
Discussion started by: Cameron
3 Replies

8. Shell Programming and Scripting

home directory

hello i want shell script. as root , i want to untar specific.tar.gz to all home user directory and after untar , there is 1.txt 2.txt ~~ 26.txt in/public_html/test1/ i want randomly selected 6 text files in 1.txt 2.txt ~26.txt to be renamed newword1.word , newword2.word , ~~... (8 Replies)
Discussion started by: topic32428285
8 Replies

9. Solaris

/home cleanup

Hi All, I have this script for linux on cleaning up orphaned folder. But I need to use this on solaris 8/9/10 for user in $(ls | grep -v lost+found) ; do id $user >/dev/null 2>&1 if ] then ls -ld $user grep $user /etc/passwd fi done Can someone please convert this script? ... (1 Reply)
Discussion started by: itik
1 Replies

10. Shell Programming and Scripting

$HOME is not getting it's value.

#!/bin/ksh while read line < elig_jobs.txt do #Gets the field from the elig_jobs.txt file that has the input location path. INPUTD=`echo "$line" | cut -c240-289` (ex: $HOME/2005) echo inputdirectory: $INPUTD (this prints $HOME/2005) I want it to print /data/user/2005... (4 Replies)
Discussion started by: radhika
4 Replies
Login or Register to Ask a Question