Sponsored Content
Full Discussion: chmod 777 security risks?
Top Forums UNIX for Dummies Questions & Answers chmod 777 security risks? Post 302097253 by Gary777 on Wednesday 22nd of November 2006 08:45:35 PM
Old 11-22-2006
chmod 777 security risks?

Hello all,

I did a considerable search of the forum and didn't find an answer so I'll ask it here. For clarity's sake I'll state that I know just enough about Unix to be Dangerous (I'm an old Clipper, VO, ASM programmer from the 80's.)

I would like to install PHP driven CMS program to my webserver (iPowerWeb hosted) called SnippetMaster (http://www.snippetmaster.com/) to allow my business partner the ability to modify webpages without messing up the core file templates (I use includes for dynamic content) but one of the requirements of SnippetMaster is that I must chmod 666 or 777 ALL of the files in ../public_html directory that I want my partner to be able to modify. It doesn't require that I chmod 777 the directory it self.

They (http://www.snippetmaster.com/) openly claim and challenge anyone to prove them wrong that chmod'ing files with 777 in the public html directory is safe as long as my server is secure, they claim that only a person who can "log on" to my server and who has access to my root directory can overwrite an existing .shtml or .html file (such as index.shtml) or overwrite an existing PHP script with a potentially hazardous one and execute it. I don't believe this, I have a very strong feeling that this is patently wrong but after Googling for the last 2 hours I have found answers that both support and discourage this practice so I thought I'd ask the experts.

1) Is chmod'ing "files" in ../public_html to 777 or 666 a safe practice?

2) Can files be over written by people surfing the web (exmp: and simply using composer to edit then save the file back to the server?)

Please explain how this works if it is in fact a safe practice...

Your help would be greatly appreciated.

Best regards,

Gary
 

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

chmod 777 on all directories below...how do I do that using the "find" command?

I've got 100 directories that each have 2 directories with in them. Structered like this: /home/domains/domain1/ through to /home/domains/domain100/ and those 2 directories mentioned above are here: /home/domains/domain1/directory1/ /home/domains/domain1/directory2/ through to... (7 Replies)
Discussion started by: Neko
7 Replies

2. Solaris

chmod -R 777 in /usr Solaris 9 = Major Screwup

Hello Everyone: One of our admins here accidently ran chmod -R 777 in the /usr folder on a V440 running Solaris 9. After that no one could run any command and could not login. I fixed most of the things by re-restricting some rights and applying the correct rights. Now there is a problem... (3 Replies)
Discussion started by: muntaser_zaheer
3 Replies

3. UNIX for Dummies Questions & Answers

chmod 777 * - oops

I can belive I really did this... chmod 777 /home :eek: I have my /home directory synced to another machine. Can anyone tell me how to get the permissions from back up server /home to production server /home It's important that I dont over write the files on the... (1 Reply)
Discussion started by: shunter63
1 Replies

4. Cybersecurity

can another user 777 and existing 777 dirctory?

User usrA creates dirA directory and runs chmod 777 on the directory. Can usrB issue another 777 on dirA? It appears the answer is no even if the usrA and usrB are part of the same group. I know this is a rare scenario but I just ran across it and found out that usrB receives an error when... (4 Replies)
Discussion started by: zlek131
4 Replies

5. UNIX and Linux Applications

What is the difference between chmod in solaris and chmod in Linux?

i think it is the same in both... Iam i right? (1 Reply)
Discussion started by: sumaiya
1 Replies

6. Windows & DOS: Issues & Discussions

chmod -R 777 * in cygwin

Hello, I use windows XP on a small server. Lately I downloaded a software (hydrological computation) which asked me to install as well the software ‘cygwin' (kind of linux in windows environment) and then to perform in cygwin window the command: ‘chmod -R 777 *' in order to give writings... (2 Replies)
Discussion started by: Cedalise
2 Replies

7. UNIX for Dummies Questions & Answers

Only allowing chmod 777 for file upload folder

Hey everyone. I have 2 different linux servers (each one is through a different web hosting company). On both servers I have the exact same PHP file upload script that allows users to upload a file or image to the server (everything on both servers is identical). On server #1 the "attachments"... (5 Replies)
Discussion started by: Mr.Canuck
5 Replies
mkdir(1)							   User Commands							  mkdir(1)

NAME
mkdir - make directories SYNOPSIS
mkdir [-m mode] [-p] dir... DESCRIPTION
The mkdir command creates the named directories in mode 777 (possibly altered by the file mode creation mask umask(1)). Standard entries in a directory (for instance, the files ".", for the directory itself, and "..", for its parent) are made automatically. mkdir cannot create these entries by name. Creation of a directory requires write permission in the parent directory. The owner-ID and group-ID of the new directories are set to the process's effective user-ID and group-ID, respectively. mkdir calls the mkdir(2) system call. setgid and mkdir To change the setgid bit on a newly created directory, you must use chmod g+s or chmod g-s after executing mkdir. The setgid bit setting is inherited from the parent directory. OPTIONS
The following options are supported: -m mode This option allows users to specify the mode to be used for new directories. Choices for modes can be found in chmod(1). -p With this option, mkdir creates dir by creating all the non-existing parent directories first. The mode given to intermedi- ate directories will be the difference between 777 and the bits set in the file mode creation mask. The difference, how- ever, must be at least 300 (write and execute permission for the user). OPERANDS
The following operand is supported: dir A path name of a directory to be created. USAGE
See largefile(5) for the description of the behavior of mkdir when encountering files greater than or equal to 2 Gbyte ( 2**31 bytes). EXAMPLES
Example 1: Using mkdir The following example: example% mkdir -p ltr/jd/jan creates the subdirectory structure ltr/jd/jan. ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of mkdir: LANG, LC_ALL, LC_CTYPE, LC_MES- SAGES, and NLSPATH. EXIT STATUS
The following exit values are returned: 0 All the specified directories were created successfully or the -p option was specified and all the specified directories now exist. >0 An error occurred. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ |CSI |enabled | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ SEE ALSO
rm(1), sh(1), umask(1), intro(2), mkdir(2), attributes(5), environ(5), largefile(5), standards(5) SunOS 5.10 1 Feb 1995 mkdir(1)
All times are GMT -4. The time now is 11:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy