CHMOD(3F)CHMOD(3F)NAME
chmod - change mode of a file
SYNOPSIS
integer function chmod (name, mode)
character*(*) name, mode
DESCRIPTION
This function changes the filesystem mode of file name. Mode can be any specification recognized by chmod(1). Name must be a single path-
name.
The normal returned value is 0. Any other value will be a system error number.
FILES
/usr/lib/libU77.a
/bin/chmod exec'ed to change the mode.
SEE ALSO chmod(1)BUGS
Pathnames can be no longer than MAXPATHLEN as defined in <sys/param.h>.
4.2 Berkeley Distribution May 15, 1985 CHMOD(3F)
Check Out this Related Man Page
CHMOD(1) General Commands Manual CHMOD(1)NAME
chmod - change mode
SYNOPSIS
chmod mode file ...
DESCRIPTION
The mode of each named file is changed according to mode, which may be an octal number or a symbolic change to the existing mode. A mode
is an octal number constructed from the OR of the following modes.
0400 read by owner
0200 write by owner
0100 execute (search in directory) by owner
0070 read, write, execute (search) by group
0007 read, write, execute (search) by others
A symbolic mode has the form:
[who] op permission
The who part is a combination of the letters u (for user's permissions), g (group) and o (other). The letter a stands for ugo. If who is
omitted, the default is a.
Op can be + to add permission to the file's mode, - to take away permission, and = to assign permission absolutely (all other bits will be
reset).
Permission is any combination of the letters r (read), w (write), x (execute), a (append only), and l (exclusive access).
Only the owner of a file or the group leader of its group may change the file's mode.
SOURCE
/sys/src/cmd/chmod.c
SEE ALSO ls(1), stat(2), stat(5)CHMOD(1)
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)
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)
I want to grant the 'write' right to one user so they can delete log files in a given directory. These are http log files, so a new one is created each day. The file owner is 'nobody'. If I use the command 'chmod a=rwx *' will this work for the new files created each day.
I've tried the... (7 Replies)
Edit: Solved, thanks ranj@chn!
Okay, i use the command: chmod -R ugo+rwx thefolderIwanttochange
Thats fine, but when I create new files or folders within "thefolderIwantochange" they are created with their own permissions (I assume this is normal Unix behaviour) rather than the permissions... (8 Replies)
I am trying to change permission for all subdirectories and files inside folder1 so this is what i came with after many seraches on the internet. man find and man chmod mirc and few articles.
find .public_html/folder1 -print0 | xargs -0 chmod 777
what's wrong with this command?
it is FTP... (33 Replies)
This is Solaris 10, by the way.
I am aware of ACLs or something like that in Solaris 10 where you can change who can access directories and such that goes beyond the standard permisisons (chmod and rwxrwxrwx).
Although I thought when these were being used, the permissions listing would show a... (12 Replies)
Hi all,
I have a script who generate as an output a lot of files (the number is highly variable : 500 to more than 10000).
At the end of this script I need to do a "chmod" on all those files. I tried
but it says
-bash: /bin/chmod: Argument list too long
So it seems that chmod can't... (9 Replies)
I have a folder that contains about 690k files and I need to change their permissions. The challenge is, I have no telnet access and the GUI FTP manager via cpanel just simply fails. I tried doing it via command line ftp but that too, fails saying 'no such file or directory'.
My last resort is... (11 Replies)
Hi,
Im struggling with what chmod to change the permission of a file in the current directory named MyFile so the command "cat MyFile" fails to display the file.?? (10 Replies)
hi,
sorry for posting this for a quick answer.
Is there a one line command to change permissions on files in a directory to a given mode (say 554) and only for those files that do not already have that mode?
Running chmod updates the last access/modified timestamp on the files, and i want to... (11 Replies)
hi,
i want to use chmod command inside ftp. so that what ever files are transfered to the local server will hav 664 permission.
if i use chmod inside ftp , the file permissions gets changed in the remote server and when the file is transffered to local server using get command, it does not... (8 Replies)
Friends,
I have weird problem with my Linux OS.
I have few files which is owned by root but could not be modified (edit, chmod, chown etc)
# id
uid=0(root) gid=0(root) groups=0(root)
# whoami
root
# ls -l /etc/security/access-sshd.conf
-rw-r--r-- 1 root root 431 Jun 22 03:31... (12 Replies)
Hello,
I am trying to create an iptables script with tail ,sed and awk.
1st Request: Search keyword "secret" in access.log file
2nd Request: Get first column matching lines (ip address)
3rd Request: Save it to a file
This is what I did so far:
grep.sh
#!/bin/bash
while true;
do
tail... (23 Replies)
Hi All,
I have a script which called by user id (mftp) . The set up is working on two server and not working one server.
Working Server :
-rw-rw-r-- 1 mftp csp 0 Jan 17 00:14 117001.log
Non working server
-rw-rw-r-- 1 mftp mftp 0 Jan 17 00:14 117001.log
from the above... (18 Replies)
The requirement is that whichever user logs in and does not find /tmp/logs folder will create the folder and a file /tmp/logs/date.log and gives full permission so that every user can read and write to the file / folder.
I write this code in setup.sh
mkdir -p /tmp/logs
touch... (8 Replies)