Sponsored Content
Full Discussion: chmod for public_html ?
Top Forums UNIX for Dummies Questions & Answers chmod for public_html ? Post 91470 by ppierald on Friday 2nd of December 2005 11:02:13 AM
Old 12-02-2005
750 says that the owner has read, write, execute and the users in the named group have read and execute privs. Everyone else is locked out with the '0'.

Your webserver is running as some effective uid. This id would have read permissions to your submission forms only if it is either the owner, or a member of the group.

You are probably using some shared web hosting service that allows lots of people to share the same physical machine. This file permission set would prevent other users that are logged into that machine from reading/writing your html files, but continue to allow the web server unix user to read your files.

Hopefully this helps.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

CHMOD Help!!

Ok, listen.........I was using FTP Works to remove and add some files to a domain server. I messed with chmod button and made it so that no-one could access or their browsers could execute files and 2 or three certain directories. If anyone knows how to use this command and will give me a heads up... (2 Replies)
Discussion started by: jarrell
2 Replies

2. UNIX for Dummies Questions & Answers

Chmod Help!

Here is the deal, I am good with html and java and am creating a website for my brother. On this site he has chosen to use a ikonboard.com discussion board. I have done everything I can to pull it off, but no can do. Here is the problem: The site is being created using the angelfire... (12 Replies)
Discussion started by: xwfprez
12 Replies

3. UNIX for Dummies Questions & Answers

chmod

Hi, can anybody help me? i have probable a simple problem about permissions. i have a server and on this server there comes some files from a another server via ftp with a separte user. i would like to modify the files with a awk script but i donīt have the permissions to modify the... (3 Replies)
Discussion started by: scotty
3 Replies

4. UNIX for Advanced & Expert Users

find a file or directory under public_html

Hi there, I have a quick question about the UNIX command find, if you can help me I will appreciate it... I am trying tho find a file which is under my 'public_html' directory. As I know, I am making the command > find ~ -name filename(or directory name) to find the file or directory... (4 Replies)
Discussion started by: milhan
4 Replies

5. UNIX for Dummies Questions & Answers

chmod...

Hey everyone, I was wondering if there was a quicker way to chmod a lot of files than doing what im currently doing. At the moment, im doing chmod 777 *filename* - but I have a lot of files, sub-directories, sub-files etc etc. And at the moment I see I have to chmod every single file... (3 Replies)
Discussion started by: mo0ness
3 Replies

6. UNIX for Dummies Questions & Answers

CHMOD query

Hi peeps, I'm new here, so I hope I'm posting in the right place... If I'm in a particular directory and I run the command 'CHMOD * 777' (or the other way around- I can't remember), am I right in saying it will only change the permissions of all the immediate files and directories and not... (1 Reply)
Discussion started by: jsp_1983
1 Replies

7. 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

8. UNIX for Dummies Questions & Answers

Granting user permission for public_html

I have problem giving user access to his public_html directory. While when I am logged as root I can access my files by going to www.myserver.com/file.htmlwhere file.html is actually on this path... var/www/file.htmlBut when user tries to access his file.html on this path.... ~user/file.html it... (10 Replies)
Discussion started by: joker40
10 Replies

9. UNIX for Dummies Questions & Answers

chmod

Hi I tried to use chmod in unix to change my file's permission. chmod 701 hello.cgi And it did change my desired file's permission. Yet, the name of the file is changed to hello.cgi* . And therefore I cannot compile it after that. So, I just wondering why there is an extra '*' in the file's... (2 Replies)
Discussion started by: alvin8906
2 Replies

10. Web Development

$_SERVER['DOCUMENT_ROOT'] directs to /var/www not ~/public_html

Hi all, Exactly like my title says. I am learning PHP and MySQL and I used to use /var/www/ to host (contain or store) my files (.htm/.php) for testing. I could configure, finally, apache2 to use ~/public_html instead. Now I when I tried to use $_SERVER it still directs (I used echo to show... (7 Replies)
Discussion started by: faizlo
7 Replies
STAT(2) 							System Calls Manual							   STAT(2)

NAME
stat, fstat, wstat, fwstat, dirstat, dirfstat, dirwstat, dirfwstat - get and put file status SYNOPSIS
#include <u.h> #include <libc.h> int stat(char *name, char *edir) int fstat(int fd, char *edir) int wstat(char *name, char *edir) int fwstat(int fd, char *edir) int dirstat(char *name, Dir *dir) int dirfstat(int fd, Dir *dir) int dirwstat(char *name, Dir *dir) int dirfwstat(int fd, Dir *dir) DESCRIPTION
Given a file's name, or an open file descriptor fd, these routines retrieve or modify file status information. Stat, fstat, wstat, and fwstat are the system calls; they deal with machine-independent directory entries. Their format is defined by stat(5). Stat and fstat retrieve information about name or fd into edir, a buffer of length DIRLEN, defined in <libc.h>. Wstat and fwstat write information back, thus changing file attributes according to edir. Dirstat, dirfstat, dirwstat, and dirfwstat are the same as their counterparts, except that they operate on Dir structures: typedef struct Dir { char name[NAMELEN]; /* last element of path */ char uid[NAMELEN]; /* owner name */ char gid[NAMELEN]; /* group name */ Qid qid; /* unique id from server */ long mode; /* permissions */ long atime; /* last read time */ long mtime; /* last write time */ Length; /* file length: see <u.h> */ ushort type; /* server type */ ushort dev; /* server subtype */ } Dir; This structure, the Qid structure, NAMELEN, and DIRLEN are defined in <libc.h>. The Length structure is defined in </$objtype/u.h>. Length is an unnamed structure (see 2c(1)), which means that its fields are directly accessible; if the length is known to fit in a long, then use length as a field name to retrieve it. If the file resides on permanent storage and is not a directory, the length returned by stat is the number of bytes in the file. For directories, the length returned is zero. For files that are streams (e.g., pipes and net- work connections), the length is the number of bytes that can be read without blocking. Each file is the responsibility of some server: it could be a file server, a kernel device, or a user process. Type identifies the server type, and dev says which of a group of servers of the same type is the one responsible for this file. Qid is a structure containing path and vers fields, each an unsigned long: path is guaranteed to be unique among all path names currently on the file server, and vers changes each time the file is modified. Thus, if two files have the same type, dev, and qid they are the same file. The bits in mode are defined by 0x80000000 directory 0x40000000 append only 0x20000000 exclusive use (locked) 0400 read permission by owner 0200 write permission by owner 0100 execute permission (search on directory) by owner 0070 read, write, execute (search) by group 0007 read, write, execute (search) by others There are constants defined in <libc.h> for these bits: CHDIR, CHAPPEND, and CHEXCL for the first three; and CHREAD, CHWRITE, and CHEXEC for the read, write, and execute bits for others. The two time fields are measured in seconds since the epoch (Jan 1 00:00 1970 GMT). Mtime is the time of the last change of content. Sim- ilarly, atime is set whenever the contents are accessed; also, it is set whenever mtime is set. Uid and gid are the names of the owner and group of the file. Groups are also users, but each server is free to associate a list of users with any user name g, and that list is the set of users in the group g. When an initial attachment is made to a server, the user string in the process group is communicated to the server. Thus, the server knows, for any given file access, whether the accessing process is the owner of, or in the group of, the file. This selects which sets of three bits in mode is used to check permissions. Only some of the fields may be changed with the wstat calls. The name can be changed by anyone with write permission in the parent direc- tory. The mode and mtime can be changed by the owner or the group leader of the file's current group. The gid can be changed by the owner if he or she is a member of the new group. The gid can be changed by the group leader of the file's current group if he or she is the leader of the new group. (See intro(5) for permission information, and users(6) for user and group information). SOURCE
/sys/src/libc/9syscall for the non-dir routines /sys/src/libc/9sys for the routines prefixed dir SEE ALSO
intro(2), fcall(2), dirread(2), stat(5) DIAGNOSTICS
All these functions return 0 on success, -1 on error, and set errstr. STAT(2)
All times are GMT -4. The time now is 05:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy