Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-06-2010, 07:47 AM   #1
LQ Newbie
Registered: Jan 2004
Posts: 23

Rep: Reputation: 0
root and other user file size handling privelidges - settable?

My ISP is closing down one server, and requiring that we move to another server ourselves.

The old server, for strange, arcane and of course unsafe reasons, had apache running as root. On the new server this is not the case. Apache is no longer running as root.

On the new server I am now unable to perform backups using a php script (moodle) of large files (100MB).

The part that hangs is using
1) zip (The path to zip, usr/bin/zip, is set correctly).
2) I think that it is using "cd" to move the zipped files between a temporary and destination directory.

The process is hanging, failing to finish, saying the files could not be moved (but it could be that the zip is failing).

Something about the user privelidge that my php is using on the new system is hanging due to file size.

I know that php settings include a limit on uploadable file size but that is not the problem. I know that the upload file limit is set to 200MB and anyway, I have uploadep by ftp to a directory where php can access the file.

The permissions of the desitination director are set to 777. I have chmodded -R 0777 all the files and directories. And anyway, I can perform backups and zips on smaller files.

So it is something to do with the privelidges relating to max file size, of my user/process.

The apache/php script is attempting to use zip, and shell commands (cd?) (via suexec?) to handle files, but failing when the files are too large.

I have asked at moodle, particularly here:
but I don't think that this is a moodle problem, rather some linux, zip or conceivably php setting.

My Questions
Is there some way of stipulating in Linux the size of file that:
a user can zip?
a user can manipulate using php/apache called shell commands (cd? perhaps via suexec or whatever php or apache command allows a user to call shell commands)?

If there are such setting, I would be very grateful if you Linux folks could let me know.

My Research Here!
After writing this post, and hitting the "click to find similar threads" button I come accross
which mentions "ulimit"!
Foxylady writes
ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) 4
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 7168
virtual memory (kbytes, -v) unlimited
I am not sure what this means, exactly, or which of these might limit the size of file that my user can zip or move (cd). But this looks good. I guess that I have been "ulimit"-ed. Is that it?
Which of the above should I ask my SYSop to change? The "stack size" and "pipe size" and "open file size" all look promising. Where are they set? via shell commands?

Future Research Possibilities
To be honest (sotto voice), I can run phpshell (I upload it then immediately delete it for the occasional chmod, which I can't do over ftp). What would be the command to find out the "ulimit" limits placed on users? If I use phpshell and do a "ulimit -a" will that tell me what limits are placed on my user?! Sounds promising.



Ps I have used some jargon, like "suexec" and "ulimit" in the above, but I assure you that I don't really know what I am talking about, because I am a newbie when it comes to Linux.
Old 10-07-2010, 01:06 AM   #2
Senior Member
Registered: Feb 2008
Location: Pune - India
Distribution: RHEL/Ubuntu/Debian/Fedora/Centos/K3OS
Posts: 1,151
Blog Entries: 4

Rep: Reputation: 147Reputation: 147

Please break the questions.Its so confusing!
Old 10-07-2010, 03:26 AM   #3
LQ Newbie
Registered: Jan 2004
Posts: 23

Original Poster
Rep: Reputation: 0
The question part above is quite short.

But fortunately, I think that I have found out the answer.

Yes, it is possible to set user file size permissions, using "ulimit" and a settings file. And it is possible to find out what limits are set on a user by the command "ulimit -a" I found out that my user is not limited in this way.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
increase root file system size superraylo Linux - Hardware 5 05-29-2006 01:40 AM
k3b only works as root: can't determine size of resulting image file c-- Linux - Software 5 03-07-2005 07:28 PM
50M user file size limit FoxyLad Linux - General 4 02-02-2005 08:04 AM
Pauls boot cd..root file size fotoguy Linux - General 2 08-03-2003 06:57 AM
user file size juno Linux - General 2 10-02-2002 05:02 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:57 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration