make the directory group ownership as GroupA with read/write rights
make the other access as read only
put this directory inside another directory which has it's group set to GroupC. This has read/write group access. The other access of this is ---, this is the important part, if you are "other" you cannnot read/write or traverse (execute).
Then add all members of GroupA and GroupB to GroupC.
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)
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)
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)
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)
I've always been fascinated by permissions and I have a question. Since the shell isn't a "virtual environment" (like say a web forum, where permissions can be enforced with absolute confidence), what's actually keeping an unauthorized user from viewing a CHMODed file? The read/write routines? Why... (1 Reply)
I have two files,like follows:
$ls -l foo bar
-rw------- bar
-rw-rw-rw- foo
Then I execute follow code:
chmod("foo",(statbuf.st_mode & ~S_IXGRP) | S_ISGID)
chmod("bar",S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)
Then I view the result
$ls -l foo bar
-rw-r--r-- bar... (1 Reply)
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)
I have a folder called "test" and this folder contains lots of other folders as sub folders, i intend to search for all file ending with .bin and then change the files to executable please how do i do this
---------- Post updated at 10:48 AM ---------- Previous update was at 10:42 AM ----------... (3 Replies)
Discussion started by: oyesiji
3 Replies
LEARN ABOUT MINIX
chmod
CHMOD(2) System Calls Manual CHMOD(2)NAME
chmod - change mode of file
SYNOPSIS
#include <sys/types.h>
#include <sys/stat.h>
int chmod(const char *path, mode_t mode)
DESCRIPTION
The file whose name is given by path has its mode changed to mode. Modes are constructed by or'ing together some combination of the fol-
lowing, defined in <sys/stat.h>:
S_ISUID 04000 set user ID on execution
S_ISGID 02000 set group ID on execution
S_ISVTX 01000 `sticky bit' (see below)
S_IRWXU 00700 read, write, execute by owner
S_IRUSR 00400 read by owner
S_IWUSR 00200 write by owner
S_IXUSR 00100 execute (search on directory) by owner
S_IRWXG 00070 read, write, execute by group
S_IRGRP 00040 read by group
S_IWGRP 00020 write by group
S_IXGRP 00010 execute (search on directory) by group
S_IRWXO 00007 read, write, execute by others
S_IROTH 00004 read by others
S_IWOTH 00002 write by others
S_IXOTH 00001 execute (search on directory) by others
If mode ISVTX (the `sticky bit') is set on a directory, an unprivileged user may not delete or rename files of other users in that direc-
tory. (Minix-vmd)
Only the owner of a file (or the super-user) may change the mode.
Writing or changing the owner of a file turns off the set-user-id and set-group-id bits unless the user is the super-user. This makes the
system somewhat more secure by protecting set-user-id (set-group-id) files from remaining set-user-id (set-group-id) if they are modified,
at the expense of a degree of compatibility.
RETURN VALUE
Upon successful completion, a value of 0 is returned. Otherwise, a value of -1 is returned and errno is set to indicate the error.
ERRORS
Chmod will fail and the file mode will be unchanged if:
[ENOTDIR] A component of the path prefix is not a directory.
[ENAMETOOLONG] The path name exceeds PATH_MAX characters.
[ENOENT] The named file does not exist.
[EACCES] Search permission is denied for a component of the path prefix.
[ELOOP] Too many symbolic links were encountered in translating the pathname. (Minix-vmd)
[EPERM] The effective user ID does not match the owner of the file and the effective user ID is not the super-user.
[EROFS] The named file resides on a read-only file system.
[EFAULT] Path points outside the process's allocated address space.
[EIO] An I/O error occurred while reading from or writing to the file system.
SEE ALSO chmod(1), open(2), chown(2), stat(2).
NOTES
The sticky bit was historically used to lock important executables into memory.
4th Berkeley Distribution May 13, 1986 CHMOD(2)