08-14-2002
directory permissions and CHMOD
I am working on a new UNIX box that has been delivered to us, and noticed that the /home directory has 555 permissions on it (dr-xr-xr-x). Any attempt to create write permissions fails on this directory (such as chmod 777), responding only with a message;
chmod: WARNING: can't change home
This is despite the fact that I am logged in as root. Is there a way out of this, or am I toast?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Is there any way that you can set it up so when you create a file it has the chmod permissions of u+x? I am not a root user on the system (1 Reply)
Discussion started by: himurak
1 Replies
2. UNIX for Advanced & Expert Users
Hi gurus !
I am developing a FTP script which will copy all the files from one server to another server and then I need to use CHMOD 755 * to set permissions of all the files just copied to the remote server.
mput *
chmod 755 *
CHMOD gives me an error
CHMOD works fine If I specify... (3 Replies)
Discussion started by: sdlayeeq
3 Replies
3. UNIX for Dummies Questions & Answers
i am unable to write to some .php files in the following directory:
drwxr-xr-x 3 headroom max 448 Jun 6 2004 Docs
i already tried this:
chmod +777 Docs
chmod: changing permissions of `Docs': Operation not permitted
thanks for your help! (2 Replies)
Discussion started by: phonedog365
2 Replies
4. UNIX for Dummies Questions & Answers
I was attempting to change permissions on a directory, used a 'chmod -rwrwrw DirectoryName' command, and hit enter. Now, that directory shows that it's empty! How could this be? Any Ideas?
Thanks (1 Reply)
Discussion started by: SmooBG
1 Replies
5. UNIX for Dummies Questions & Answers
Hello,
When I do a "ls -l" I can see my directories have
drwxr-xr-xr. I am more used to the chmod numerical syntax like 755. Is there an easy way to list out the numerical permissions rather than rwx etc. (1 Reply)
Discussion started by: rondebbs
1 Replies
6. UNIX for Dummies Questions & Answers
Hello all,
Trying to do the following.
1. Run Windows installer from a unix server.
2. Let user run the shortcut but not allow access to the folder where the exe itself is running.
What I have done so far:
1. Copied the application to the server and placed in a folder called "data".... (2 Replies)
Discussion started by: whiterabbit
2 Replies
7. UNIX for Dummies Questions & Answers
if I have a file set to permisions 444 (r-- r-- r--) should anyone other than the owner and root be able to change these permissions or delete the file.
Apologies if this is a no-brainer but I cant test it myself and someone in our organisation is playin around with files they shouldnt be (1 Reply)
Discussion started by: ajcannon
1 Replies
8. Programming
sprintf(fname, "core.%d", pid);
(void) unlink(fname);
if (ttrace(TT_PROC_CORE, pid, 0, 0, 0, 0) != 0) {
perror("TT_PROC_CORE pass");
Fail();
}
if (chmod(fname, 0) != 0) {
perror("chmod");
Fail();
}
Hi,
If i execute above code,everytime am getting below... (1 Reply)
Discussion started by: mansa
1 Replies
9. Red Hat
I am having trouble figuring out how to do a "chmod o-w" for all files under a certain directory, while excluding directories under that certain directory.
I can do
chmod -R o-w /thisdirectory
but that changes permissions of all directories under the directory as well as files. I just... (2 Replies)
Discussion started by: austinharris43
2 Replies
10. UNIX for Dummies Questions & Answers
Hi All
I am running Ubuntu linux flavour.
I need provide multiple users belonging to the same group access to a dir where they can write files but are not supposed to remove or rename files. users outside the group should be able to read and write to the dir.
i have set the permission of... (7 Replies)
Discussion started by: Simza
7 Replies
LEARN ABOUT PHP
pharfileinfo.chmod
PHARFILEINFO.CHMOD(3) 1 PHARFILEINFO.CHMOD(3)
PharFileInfo::chmod - Sets file-specific permission bits
SYNOPSIS
public void PharFileInfo::chmod (int $permissions)
DESCRIPTION
PharFileInfo.chmod(3) allows setting of the executable file permissions bit, as well as read-only bits. Writeable bits are ignored, and set
at runtime based on the phar.readonly INI variable. As with all functionality that modifies the contents of a phar, the phar.readonly INI
variable must be off in order to succeed if the file is within a Phar archive. Files within PharData archives do not have this restriction.
PARAMETERS
o $permissions
- permissions (see chmod(3))
RETURN VALUES
No value is returned.
EXAMPLES
Example #1
A PharFileInfo.chmod(3) example
<?php
// make sure it doesn't exist
@unlink('brandnewphar.phar');
try {
$p = new Phar('brandnewphar.phar', 0, 'brandnewphar.phar');
$p['file.sh'] = '#!/usr/local/lib/php
<?php echo "hi"; ?>';
// set executable bit
$p['file.sh']->chmod(0555);
var_dump($p['file.sh']->isExecutable());
} catch (Exception $e) {
echo 'Could not create/modify phar: ', $e;
}
?>
The above example will output:
bool(true)
PHP Documentation Group PHARFILEINFO.CHMOD(3)