Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am developing a site in PHP on Linux Server where I need to download a file from Windows Server to Linux Machine. I can do it with Some Changes in SeLinux or setting some properties on it, i.e.:

% setsebool -P httpd_disable_trans=1

But our client refuses to compromise any security for this functionality. So we need to find any other workarounds. What else can we do?

share|improve this question
    
How do you intend to download the file? What method will you use? –  Matthew Ife Mar 29 '13 at 14:19
    
Right. You need to know (and tell us) how you are fetching this file. –  Michael Hampton Mar 29 '13 at 16:38
1  
Refuses to compromise any security and runs a PHP application might be mutually exclusive. –  davey Mar 30 '13 at 9:03
    
i used code below if (ftp_get($conn_id, $local_file, $remote_file, FTP_BINARY)) { echo "successfully written to $local_file\n"; } else { echo "Not Downloaded"; } –  Supriya Apr 1 '13 at 4:18

1 Answer 1

Maybe they will accept a policy extension for SELinux to allow the web server to do certain kinds of operations against a particular file or directory. To create a custom policy there is a tool called audit2allow which can help you generate the policy you need. There is an example of creating a custom SELinux policy module at:

http://wiki.centos.org/HowTos/SELinux#head-d8db97e538d95b1bc5e54fc5a9ddb0c953e9a969

If you do this make sure the process is well documented because it's the kind of thing that can get broken on a new deployment or on an update and you want to make sure it's not missed during those kinds of activities.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.