Sponsored Content
Top Forums Web Development Mac. PHP. fopen( ) does not create a file. Permissions. Post 302892445 by DGPickett on Wednesday 12th of March 2014 04:54:02 PM
Old 03-12-2014
Usually, on UNIX and friends like apple, the directory permissions may prevent your ID/Group from creating files. open(2): open/possibly create file/device - Linux man page
EACCES The requested access to the file is not allowed, or search permission is denied for one of the directories in the path prefix of pathname, or the file did not exist yet and write access to the parent directory is not allowed. (See also path_resolution(7).) path_resolution(7) - Linux man page
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

File Permissions in Mac OS X

On my Mac OS X machine, I would like to edit the httpd.conf Apache configuration file. When I open the file up in TextEdit or even VI, I get an error that there was an error saving the file. I tried "su root" and that still does not work. I heard that the "chown" command can change the file... (11 Replies)
Discussion started by: liveapple2000
11 Replies

2. Programming

Mac OS X - open() and fopen() with French filename

Hi I was trying to open a file with french name on Mac OS-X with open() and fopen() but it didn't work.Do we have any POSIX unix func. which can be used to open any file with special name. if anybody has an idea plz help. Thanks Mohit (1 Reply)
Discussion started by: mohit grover
1 Replies

3. HP-UX

To give the "unzip" permissions & "create" file permissions

Hi, I am a Unix Admin. I have to give the permissions to a user for creating new file in a directory in HP-Ux 11.11 system since he cannot able to create a new file in the directory. Thanks in advance. Mike (3 Replies)
Discussion started by: Mike1234
3 Replies

4. UNIX for Dummies Questions & Answers

How to create new users on my mac from the terminal

I finally got how to su - in my mac from the terminal. Now I would like to be able to add new users. useradd -m -d ..... doesn't seem to work. (1 Reply)
Discussion started by: bigmac18
1 Replies

5. Shell Programming and Scripting

permissions to create log file from script

hi all, have a script which i am using to generate a log file. i use "touch out.log" command to create the file and later on i want to echo lines to this file. for some reason it keeps giving me this error when i try and create the file ; touch: out.log cannot create i have... (3 Replies)
Discussion started by: cesarNZ
3 Replies

6. Shell Programming and Scripting

Get password protected URL folder using PHP fopen function

Hi everybody, Please some help over here, I`m pretty new in PHP. I have a cronrefresh php file within a website, I need this script get infornation from a URL of the site. Part of the script where $URL variable appears is: $fdURL = mysql_query("SELECT * FROM affiliSt_config WHERE name... (2 Replies)
Discussion started by: cgkmal
2 Replies

7. Shell Programming and Scripting

Create duplicate directories with same permissions

Hi all, I need to create duplicate directories and sub directories (only the directories not the files or file contents) with the same permissions. Can some one guide me in doing this. I could able to create but here the permissions should be the same how can i do this in linux. Thanks in... (5 Replies)
Discussion started by: Olivia
5 Replies

8. HP-UX

How to create a user in UNIX with some limited permissions?

As i know, Unix or Linux only manages 2 type of user: root user or normal user. All users with userID=0 will have all administration permissions like root user with the system. In my case, i want to create a new user in HP-UNIX environment with all root permissions only one exception that this... (5 Replies)
Discussion started by: hieucn1404
5 Replies

9. Shell Programming and Scripting

Mac. PHP fopen() does not create a file. Permissions.

5Thank you to those who responded. After a crazy amount of troubleshooting and getting hints and feedback from others, I was so darn determined to get on with my tutorials and I found the solution myself. Keyword search: php and 'Mac computer' and fopen and chmod. Using:php and Mac and... (1 Reply)
Discussion started by: iHaveAQuestion
1 Replies

10. AIX

How to create all files generated in a directory with 644 permissions?

Hi, We are using AIX machines. How to create all files generated in a directory with 644 permissions automatically. Regards, Suresh (11 Replies)
Discussion started by: suresh3566
11 Replies
UNLINK(2)						     Linux Programmer's Manual							 UNLINK(2)

NAME
unlink - delete a name and possibly the file it refers to SYNOPSIS
#include <unistd.h> int unlink(const char *pathname); DESCRIPTION
unlink() deletes a name from the file system. If that name was the last link to a file and no processes have the file open the file is deleted and the space it was using is made available for reuse. If the name was the last link to a file but any processes still have the file open the file will remain in existence until the last file descriptor referring to it is closed. If the name referred to a symbolic link the link is removed. If the name referred to a socket, fifo or device the name for it is removed but processes which have the object open may continue to use it. RETURN VALUE
On success, zero is returned. On error, -1 is returned, and errno is set appropriately. ERRORS
EACCES Write access to the directory containing pathname is not allowed for the process's effective UID, or one of the directories in path- name did not allow search permission. (See also path_resolution(7).) EBUSY (not on Linux) The file pathname cannot be unlinked because it is being used by the system or another process and the implementation considers this an error. EFAULT pathname points outside your accessible address space. EIO An I/O error occurred. EISDIR pathname refers to a directory. (This is the non-POSIX value returned by Linux since 2.1.132.) ELOOP Too many symbolic links were encountered in translating pathname. ENAMETOOLONG pathname was too long. ENOENT A component in pathname does not exist or is a dangling symbolic link, or pathname is empty. ENOMEM Insufficient kernel memory was available. ENOTDIR A component used as a directory in pathname is not, in fact, a directory. EPERM The system does not allow unlinking of directories, or unlinking of directories requires privileges that the calling process doesn't have. (This is the POSIX prescribed error return; as noted above, Linux returns EISDIR for this case.) EPERM (Linux only) The file system does not allow unlinking of files. EPERM or EACCES The directory containing pathname has the sticky bit (S_ISVTX) set and the process's effective UID is neither the UID of the file to be deleted nor that of the directory containing it, and the process is not privileged (Linux: does not have the CAP_FOWNER capabil- ity). EROFS pathname refers to a file on a read-only file system. CONFORMING TO
SVr4, 4.3BSD, POSIX.1-2001. BUGS
Infelicities in the protocol underlying NFS can cause the unexpected disappearance of files which are still being used. SEE ALSO
rm(1), chmod(2), link(2), mknod(2), open(2), rename(2), rmdir(2), unlinkat(2), mkfifo(3), remove(3), path_resolution(7), symlink(7) COLOPHON
This page is part of release 3.27 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2004-06-23 UNLINK(2)
All times are GMT -4. The time now is 05:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy