?
Solved

chmod ???

Posted on 2000-04-09
4
Medium Priority
?
412 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 120 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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
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…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Suggested Courses
Course of the Month8 days, 19 hours left to enroll

765 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