07-23-2003
How do i find files querying by permissions rights?
I'm running tikiwiki with some pretty big PHP scripts - somewhere one script has gotten uid 730 instead of 777. This invokes a PHP SAFE_MODE restriction, resulting in annoying error messages - sometimes in fatal errors.
How do i perform a commandline search to find the file(s) with uid 730 i.e. rwxwx ?
I'm connectred via SSH using "Putty" to Bash.
Thankx - and hope the question isn't too dumb, i'm new to UNIX
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi. I want to get a list of files, in a given folder, that aren't world readable (a+r). I've looked at the documentation on the FIND command, however I don't see how to list files by excluding permissions.
find . -perm 644 -> would list only files that are 644
If I could use wildcards, I... (1 Reply)
Discussion started by: dmilks
1 Replies
2. UNIX for Advanced & Expert Users
Hello Everyone,
if we log on to unix server how do we find that what permissions/roles and priveleges are assigned to any particular user.
Here i am not talking about the file permissions.
Thanks (1 Reply)
Discussion started by: hardesh
1 Replies
3. Cybersecurity
Just joined after using the site as a guest.. (Very Good Stuff in here.. thanks folks.)
I am in the process of hardening a Solaris 10 server using JASS. I also must use DISA Security Checklists (SRR) scripts to test for things that did not get hardened to DISA standards.
One of the things... (5 Replies)
Discussion started by: altamaha
5 Replies
4. UNIX for Dummies Questions & Answers
I want to check if in a host a set of persons have sudo access or not and I dont have root access to the host. (1 Reply)
Discussion started by: pristine
1 Replies
5. UNIX for Dummies Questions & Answers
Hi. I would like to know if there is any command that could list simple file permissions (like , R , RW..etc) for a given uid/userid and on a given file/dir. (9 Replies)
Discussion started by: ram123
9 Replies
6. Shell Programming and Scripting
I have a list of files in a.txt file. For each of the files listed in that file, I would like to obtain the owner of the file and also, the permissions associated with that file.
If possible, the group the owner belongs to as well.
Can someone help me with a script to find that out. (1 Reply)
Discussion started by: ggayathri
1 Replies
7. UNIX for Dummies Questions & Answers
Hi I need help. I need to use find (or grep I don't care) to recursively search for files who have any kind of executable permissions (group and/or owner and/or other). I am looking for *.c and *.h
This what I am using now:
find . -name *.h -perm -111 -print
but I don't want to retype that... (4 Replies)
Discussion started by: dissectcode
4 Replies
8. Shell Programming and Scripting
good evening .. I have a plea, who I can help me with a management application user rights on the files in a Unix / Linux
I need for college .. .. and not told us no clue .. thank you (1 Reply)
Discussion started by: alex90
1 Replies
9. Shell Programming and Scripting
My git post-update has the following lines in it to make sure the permissions are set right:
find /usr/local/apache/htdocs -type d -print0 | xargs -0 chmod 755
find /usr/local/apache/htdocs -type f -print0 | xargs -0 chmod 644
chown -R apache:apache /usr/local/apache/htdocsThe only problem is... (5 Replies)
Discussion started by: dheian
5 Replies
10. Shell Programming and Scripting
Hi,
In the code below, while the "xarsg" command does not search in
"tavi_valo" subdir?
IAB00201:UG02222:EXPL> ls -1|xargs -IXX find XX -name tv_va_servbonos 2>/dev/null
UG02222/fuentes/TAVA/TAVA4E0000/backup/tv_va_servbonos... (2 Replies)
Discussion started by: Jose Luis
2 Replies
LEARN ABOUT PHP
phpversion
PHPVERSION(3) 1 PHPVERSION(3)
phpversion - Gets the current PHP version
SYNOPSIS
string phpversion ([string $extension])
DESCRIPTION
Returns a string containing the version of the currently running PHP parser or extension.
PARAMETERS
o $extension
- An optional extension name.
RETURN VALUES
If the optional $extension parameter is specified, phpversion(3) returns the version of that extension, or FALSE if there is no version
information associated or the extension isn't enabled.
EXAMPLES
Example #1
phpversion(3) example
<?php
// prints e.g. 'Current PHP version: 4.1.1'
echo 'Current PHP version: ' . phpversion();
// prints e.g. '2.0' or nothing if the extension isn't enabled
echo phpversion('tidy');
?>
Example #2
PHP_VERSION_ID example and usage
<?php
// PHP_VERSION_ID is available as of PHP 5.2.7, if our
// version is lower than that, then emulate it
if (!defined('PHP_VERSION_ID')) {
$version = explode('.', PHP_VERSION);
define('PHP_VERSION_ID', ($version[0] * 10000 + $version[1] * 100 + $version[2]));
}
// PHP_VERSION_ID is defined as a number, where the higher the number
// is, the newer a PHP version is used. It's defined as used in the above
// expression:
//
// $version_id = $major_version * 10000 + $minor_version * 100 + $release_version;
//
// Now with PHP_VERSION_ID we can check for features this PHP version
// may have, this doesn't require to use version_compare() everytime
// you check if the current PHP version may not support a feature.
//
// For example, we may here define the PHP_VERSION_* constants thats
// not available in versions prior to 5.2.7
if (PHP_VERSION_ID < 50207) {
define('PHP_MAJOR_VERSION', $version[0]);
define('PHP_MINOR_VERSION', $version[1]);
define('PHP_RELEASE_VERSION', $version[2]);
// and so on, ...
}
?>
NOTES
Note
This information is also available in the predefined constant PHP_VERSION. More versioning information is available using the
PHP_VERSION_* constants.
SEE ALSO
PHP_VERSION constants, version_compare(3), phpinfo(3), phpcredits(3), php_logo_guid(3), zend_version(3).
PHP Documentation Group PHPVERSION(3)