Discussion:
/tmp/directory
Tedd Sperling
2013-07-22 15:20:56 UTC
Permalink
Hi gang:

I should know this, but I don't.

Where is the /tmp/ directory?

You see, I have a client where his host has apparently changed the /tmp/ directory permissions such that old php/mysql scripts cannot write to the /tmp/ directory anymore -- they did at one time.

So, how do I fix it?

Cheers,

tedd

_____________________
***@sperling.com
http://sperling.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Tedd Sperling
2013-07-22 15:50:08 UTC
Permalink
Post by Tedd Sperling
I should know this, but I don't.
Where is the /tmp/ directory?
You see, I have a client where his host has apparently changed the /tmp/ directory permissions such that old php/mysql scripts cannot write to the /tmp/ directory anymore -- they did at one time.
So, how do I fix it?
Cheers,
tedd
Let me add -- the PHP version I am working with is 4.3.10.

I know...

tedd

_____________________
***@gmail.com
http://sperling.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Ken Robinson
2013-07-22 15:56:23 UTC
Permalink
Post by Tedd Sperling
Post by Tedd Sperling
I should know this, but I don't.
Where is the /tmp/ directory?
You see, I have a client where his host has apparently changed
the /tmp/ directory permissions such that old php/mysql scripts
cannot write to the /tmp/ directory anymore -- they did at one time.
Post by Tedd Sperling
So, how do I fix it?
Cheers,
tedd
Let me add -- the PHP version I am working with is 4.3.10.
I know...
tedd
The version of PHP should have nothing to do with this problem.

The /tmp directory should be writable by everyone. If it's not, you
need to talk to the hosting company support people.

Ken
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Larry Martell
2013-07-22 15:59:53 UTC
Permalink
Post by Tedd Sperling
Post by Tedd Sperling
I should know this, but I don't.
Where is the /tmp/ directory?
You see, I have a client where his host has apparently changed the /tmp/ directory permissions such that old php/mysql scripts cannot write to the /tmp/ directory anymore -- they did at one time.
So, how do I fix it?
Cheers,
tedd
Let me add -- the PHP version I am working with is 4.3.10.
I know...
df /tmp should show you where it's mounted.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Larry Martell
2013-07-22 16:02:00 UTC
Permalink
On Mon, Jul 22, 2013 at 9:59 AM, Larry Martell
Post by Larry Martell
Post by Tedd Sperling
Post by Tedd Sperling
I should know this, but I don't.
Where is the /tmp/ directory?
You see, I have a client where his host has apparently changed the /tmp/ directory permissions such that old php/mysql scripts cannot write to the /tmp/ directory anymore -- they did at one time.
So, how do I fix it?
Cheers,
tedd
Let me add -- the PHP version I am working with is 4.3.10.
I know...
df /tmp should show you where it's mounted.
And sys_get_temp_dir() will tell you the path.

# php
<?
print sys_get_temp_dir()
?>

/tmp
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Tedd Sperling
2013-07-22 16:06:52 UTC
Permalink
Post by Larry Martell
On Mon, Jul 22, 2013 at 9:59 AM, Larry Martell
Post by Larry Martell
Post by Tedd Sperling
Post by Tedd Sperling
I should know this, but I don't.
Where is the /tmp/ directory?
Let me add -- the PHP version I am working with is 4.3.10.
I know...
df /tmp should show you where it's mounted.
And sys_get_temp_dir() will tell you the path.
# php
<?
print sys_get_temp_dir()
?>
One might think that -- but no.

The version is dated.

tedd


_____________________
***@gmail.com
http://sperling.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Tamara Temple
2013-07-22 18:50:51 UTC
Permalink
Post by Tedd Sperling
I should know this, but I don't.
Where is the /tmp/ directory?
You see, I have a client where his host has apparently changed the /tmp/ directory permissions such that old php/mysql scripts cannot write to the /tmp/ directory anymore -- they did at one time.
So, how do I fix it?
Cheers,
tedd
_____________________
http://sperling.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
This is one of those questions I look at sideways and think "they did WHAAAA???"

Anyway, /tmp is under / on most linux systems, /private/tmp sometimes; I've encountered one system where it linked to /var/tmp, too. Try:

$ /bin/ls -ld /tmp

and see what it shows. -l is long listing, which will show permissions, if it's symlinked, etc. -d will treat /tmp as a file rather than as a directory (which would show the contents of /tmp).

Hopefully, they didn't delete the /tmp directory; but if they had, *many* things would probably stop working….
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Matijn Woudt
2013-07-22 20:10:34 UTC
Permalink
Post by Tedd Sperling
I should know this, but I don't.
Where is the /tmp/ directory?
You see, I have a client where his host has apparently changed the /tmp/
directory permissions such that old php/mysql scripts cannot write to the
/tmp/ directory anymore -- they did at one time.
So, how do I fix it?
Cheers,
tedd
Switch host? /tmp is required by the FHS and POSIX standards (writable for
any user), any host changing that should have no customers.

- Matijn
Tedd Sperling
2013-07-23 02:10:41 UTC
Permalink
Post by Matijn Woudt
Post by Tedd Sperling
I should know this, but I don't.
Where is the /tmp/ directory?
You see, I have a client where his host has apparently changed the /tmp/
directory permissions such that old php/mysql scripts cannot write to the
/tmp/ directory anymore -- they did at one time.
So, how do I fix it?
Cheers,
tedd
Switch host? /tmp is required by the FHS and POSIX standards (writable for
any user), any host changing that should have no customers.
- Matijn
Good point -- we will add that reason to the many other reasons why we are changing host.

Keep in mind, the installed software worked for nearly a decade and now the host has changed something that caused this error, but the current host doesn't seem to know what happened.

Cheers,

tedd

_____________________
***@sperling.com
http://sperling.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Daniel Brown
2013-07-23 13:55:44 UTC
Permalink
Post by Tedd Sperling
Post by Matijn Woudt
Post by Tedd Sperling
I should know this, but I don't.
Where is the /tmp/ directory?
You see, I have a client where his host has apparently changed the /tmp/
directory permissions such that old php/mysql scripts cannot write to the
/tmp/ directory anymore -- they did at one time.
So, how do I fix it?
Cheers,
tedd
Switch host? /tmp is required by the FHS and POSIX standards (writable for
any user), any host changing that should have no customers.
- Matijn
Good point -- we will add that reason to the many other reasons why we are changing host.
Keep in mind, the installed software worked for nearly a decade and now the host has changed something that caused this error, but the current host doesn't seem to know what happened.
If it's /tmp, it's /tmp. The leading slash indicates that it's in
the filesystem root. However, if it's just tmp, then it could - and
probably is - under the client's home directory. Unless they're
chrooted; then it could be displayed as /tmp, but would actually be
virtualized by the OS, where /tmp isn't really /tmp, but could be
/var/virtfs/user/tmp.

Confusing? Sure. Off-topic for the list? Sort of, but that's
easy enough to change.

Since you can't use get_sys_temp_dir() on 4.3.10, you should
instead see if $_ENV contains an array key for TMP, TMPDIR, or TEMP.
Or, if you'd rather, you can use getenv('TMP') and the like. It
doesn't mean that you'll get any useful information back (or anything
at all, necessarily), but it's another thing to try when using such an
antiquated version (I believe it was released at the end of 2004).

--
</Daniel P. Brown>
Network Infrastructure Manager
http://www.php.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Tedd Sperling
2013-07-23 17:00:27 UTC
Permalink
Post by Daniel Brown
If it's /tmp, it's /tmp. The leading slash indicates that it's in
the filesystem root. However, if it's just tmp, then it could - and
probably is - under the client's home directory. Unless they're
chrooted; then it could be displayed as /tmp, but would actually be
virtualized by the OS, where /tmp isn't really /tmp, but could be
/var/virtfs/user/tmp.
Confusing? Sure. Off-topic for the list? Sort of, but that's
easy enough to change.
Since you can't use get_sys_temp_dir() on 4.3.10, you should
instead see if $_ENV contains an array key for TMP, TMPDIR, or TEMP.
Or, if you'd rather, you can use getenv('TMP') and the like. It
doesn't mean that you'll get any useful information back (or anything
at all, necessarily), but it's another thing to try when using such an
antiquated version (I believe it was released at the end of 2004).
Thanks Daniel.

tedd


_____________________
***@sperling.com
http://sperling.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Loading...