473,606 Members | 3,100 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

linux file permissions on maildir, apache user

hello everyone,

i have the following problem. I am trying to create maildir
directories on the local filesystem then chmod, chown them to
courier:courier (for courier mail server). the courier mail server
reads and writes on these maildirs on the local filesystem and they
need to have courier:courier ownership. it does not work because the
directories are created with apache:apache ownership and apparently
only root can change ownership. My question is as follows. Is the
only solution to this problem to add the courier user to the apache
group?

thanks so much for your time!
julia
Jul 17 '05 #1
1 4941
This script, which is dangerous !! might work :
<?
system("su");
system("rootpas s<cr>");
system("chown -R courier:courier /your/directory");
system("chmod -R ug+rw /your/directory/");
system("exit");
?>
I precise that I juste discover php, don't mail me to tell : oh you are
crazy, this might causes the server lost. I'm a newbie, but I've been
testing this for running an application wich is not owned by apache, and it
works well

--
ciAo, Florian
-------------------
http://ritalman.no-ip.org
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
6461
by: Phil Powell | last post by:
print_r(is_file("$logPath/$logFileName")); // RETURNS 1 unlink("$logPath/$logFileName"); // RETURNS WARNING: PERMISSION DENIED This code should tell me that the file located at $logPath/$logFileName should delete the log file, however, it never deletes it due to permissions error. However, upon checking the file properties I find this:
6
1716
by: jonathanmcdougall | last post by:
I have read many posts on this subject and found no satisfying answer. I am creating a file on the server via a PHP script. The file is created using GD (imagejpeg()), though I don't think it is specific to GD. Here is what I understand so far: 1) a PHP script runs in the webserver user space. In my case, this is 'apache', though I think 'nobody' is quite frequent also. 2) creating a file from the script makes the "current" user its...
13
3407
by: raykyoto | last post by:
Hi all, I'm sure this is a popular question that comes up every few months here. Indeed, I've looked at some of the past postings, but I would like to ask things differently. Basically, I'm using a flat file to storing data. I have to do this because mySQL is not installed on my web server, and I am not the root user. The amount of data is so small, that it isn't worth a full-blown database anyway. However, while the data is...
3
8277
by: eholz1 | last post by:
Hello PHP Group, I am having trouble setting permissions correctly so that the magickwand api (php 5.2) can read and write images. I usually read a file from one directory, create a magickwand resource from that file, and transform the image, and save the new image with a new name to a different directory. I have seen that my file and folder permissions when set incorrectly,
7
11345
by: theGerm | last post by:
Is it possible for me to restart a service with PHP? I need to run this from a webpage /sbin/service squid reload
30
1951
by: Adam Baker | last post by:
Hello, I'm writing a site where a handful of people will be able to edit the content using PHP scripts (FCKeditor). The content is stored as individual files in a directory. I'd like to validate the "editors" using PHP, cookies, etc. The question is what file permissions I need to allow for the content to be writable by my PHP script. Do I really need to give write permissions to the "other" group. Are all wikis really that vulnerable?...
2
2006
by: tinnews | last post by:
I am trying to write a utility to remove empty maildir mailboxes. It sounds like this should be very simple but it's proving really difficult. I'm doing this on a Fedora 7 system with python 2.5. The first question is how to detect whether a directory is a maildir mailbox. The following code snippet *never* says that a directory is not a maildir:-
11
2057
by: salmobytes | last post by:
Perhaps this is an apache server question, rather than a php question. But I want to use a simple php upload script in a user-home-sub-document-root dir on a standard linux box. If php is a mod.so it is the apache process that does the uploading, so it cannot upload into a directory that belongs to "username" unless the file permissions are 777, or perhaps......some way to use group permissions that allows the apache process to write to...
20
7758
by: macca | last post by:
Hi, I just started a new web developer job (my first actually) and the machine they gave me to use is a Mac. Two days in and I'm running a Win XP environment on my Mac at work (using VMWare), firstly so I can use my favourite text editor (ConTEXT) which is only available for windows and secondly because I've never used a Mac before. But what do you think is the best all round development platform that I should use as a Web Developer?...
0
8036
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7978
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8461
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
5470
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3948
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4010
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2454
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1572
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1313
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.