Solved

chmod ???

Posted on 2000-04-09
4
410 Views
Last Modified: 2013-12-06
Hi ! I got a new webserver with red hat.
I want to chmod an directory, so that only my perl scripts have access to it and not any user by the www. How do I do this ?

+rwx  +rwx  -rwx ????

regards
ItsMe
0
Comment
Question by:ItsMe
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 3

Expert Comment

by:jyu_88
ID: 2697794
question is who perl script runs as and what rights they require for this directory? If they are CGI scripts,and web server runs as 'nobody', and
1) you don't have SuEexc or CGI wrapper.
chown root:root privateDir
chmod 771 privateDir
The last bit of permission depends on what kind of access you perl script needs to this directory, ready some file under(771), write some file under(773)?

or more likeyly,
chown nobody:root privdateDir
chmod
2) you do have CGI wrapper or SuExec set up to run it as some legit user on your system, say, 'cgiowner'
chown cgiowner:root privdateDir
chmod 700 privdateDir
0
 

Author Comment

by:ItsMe
ID: 2697906
my script runs in /cgi-bin
i need to read and write some files in /cgi-bin/db or i use an dir lower than the www has access to. but there's the second problem: other users of the server have access to my scripts and files by their telnet account.
0
 
LVL 3

Accepted Solution

by:
jyu_88 earned 30 total points
ID: 2698195

/cgi-bin is just an alias, in other words, you can put your cgi-bin anywhere you can, far away from DocumentationRoot. my htdocs is at /home/httpd/htdocs while my cgi scripts are at /etc/httpdTo avoid local user to access those scripts, you can do something like:chown root:nobody cgiBinDirchown 750 cgiBinDirchown 770 cgiBinDir/dbThis way, user other than root and those in nobody group cannot access your cgibinDir.
0
 

Author Comment

by:ItsMe
ID: 2698443
thanks
0

Featured Post

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question