Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

defaulting new files to 755 1

Status
Not open for further replies.

owenbrown

MIS
May 22, 2003
32
US
I notice that the file permissions default to 644. I get an internal server error when they don't have the execute permission, so I have been manually changing them to 755. Is there a way to change the default permissions for new files in the directory?
 
Not all files need to be executable. Having all files with executable status can put you in a serious security risk.

What files are you adding that is causing you to get this error.

In your profile, the default umask is 644 and can be changed. Use the man pages to find out more on umask
 
This is what I get for the man page, is this all it is suppose to say?

# man umask
<standard input>:16: realpath on `bash.1' failed: No such file or directory
BASH_BUILTINS(1) BASH_BUILTINS(1)

NAME
bash, :, ., [, alias, bg, bind, break, builtin, case, cd, command, compgen, complete, con-
tinue, declare, dirs, disown, echo, enable, eval, exec, exit, export, fc, fg, for, getopts,
hash, help, history, if, jobs, kill, let, local, logout, popd, printf, pushd, pwd, read,
readonly, return, set, shift, shopt, source, suspend, test, times, trap, type, typeset,
ulimit, umask, unalias, unset, until, wait, while - bash built-in commands, see bash(1)

BASH BUILTIN COMMANDS
SEE ALSO
bash(1), sh(1)

GNU Bash-2.05a 2001 October 29 BASH_BUILTINS(1)
 
Go to google.com and for the search type &quot;man umask&quot;
 
Only directories have execution bit set on creation. For regular files you have to do
Code:
 chmod +x
file

Hope This Help
PH.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top