Jump to content

enkidu72

Members
  • Posts

    51
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

enkidu72's Achievements

Member

Member (2/5)

0

Reputation

  1. The file will be moved , but still will reside on the server . The security issue is just a "political" problem . This portal , and the certificates are of the max importance , with then you "could" access to hundreds of computers all over the world . So my chiefs ( that are not IT ) want the max security you can think of . The code is crypted . The session itself it's a problem because reside on the server , so we crypt and move them to a database on another machine physically connected to the web server that accepts connections only from one ethernet nic .
  2. I'll try to explain better ... User upload his personal cert via a form . The certificate is then something like this : $_FILES['cert']['tmp_name'] which actually is a file stored in the apache server . There is a ( VERY ) remote possibility that someone can gain root access to the web server , and so can read this file . A program uses this file to generate a personal proxy for the user .
  3. Hi neil.johnson , all this measures are already implemented on the web site . But still seems that's not enough . The main problem is with this files being uploaded via web and stored ( even for some second ) in the fs ..
  4. Hi all ... I 'm coding for a site that has to be very secure . The problem is that users are sending via form a private certificate , which has to be used in the creation of a personal proxy . Files sent by a form are stored with a tmp name on the server , which is not what we want . In the case of someone gaining the root access to the machine he could retrieve and use them . We have thought about crypted filesystem , crypted session on a remote db and much more . I' d like to know if someone has some idea ... Thx in advance David
  5. Is that right ? It seems to work but seems "pervert" to me mysql> describe members ; describe groups ; describe group_user ; +------------+-------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +------------+-------------+------+-----+---------+----------------+ | id | int(4) | NO | PRI | NULL | auto_increment | | username | varchar(65) | NO | | | | | password | varchar(65) | NO | | | | | permission | int(4) | YES | | NULL | | +------------+-------------+------+-----+---------+----------------+ 4 rows in set (0.00 sec) +------------+-------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +------------+-------------+------+-----+---------+----------------+ | id | int(4) | NO | PRI | NULL | auto_increment | | group_name | varchar(20) | YES | | NULL | | +------------+-------------+------+-----+---------+----------------+ 2 rows in set (0.00 sec) +-------+--------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+--------+------+-----+---------+-------+ | uid | int(4) | NO | | | | | gid | int(4) | NO | | | | +-------+--------+------+-----+---------+-------+ 2 rows in set (0.00 sec) mysql> select * from members ; select * from groups ; select * from group_user ; +----+----------+----------+------------+ | id | username | password | permission | +----+----------+----------+------------+ | 1 | david | desmo2 | 1 | | 2 | andrea | pippo | 0 | +----+----------+----------+------------+ 2 rows in set (0.00 sec) +----+------------+ | id | group_name | +----+------------+ | 1 | david | | 2 | users | | 3 | andrea | +----+------------+ 3 rows in set (0.00 sec) +-----+-----+ | uid | gid | +-----+-----+ | 1 | 1 | | 1 | 2 | | 2 | 2 | | 2 | 3 | +-----+-----+ 4 rows in set (0.00 sec) So if I want to know which groups david is inside : mysql> select group_name from members inner join group_user on group_user.uid=members.id inner join groups on group_user.gid=groups.id where members.id=1 ; +------------+ | group_name | +------------+ | david | | users | +------------+ 2 rows in set (0.00 sec) I'm not very sure of this ...
  6. Hello all , I have what is (probably) a very stupid question ... I need to create tables for a db but I'm a bit confused and I hope someone could help ... I have a table members containing details about users: describe members ; +------------+-------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +------------+-------------+------+-----+---------+----------------+ | id | int(4) | NO | PRI | | auto_increment | | username | varchar(65) | NO | | | | | password | varchar(65) | NO | | | | | group | int(4) | NO | | | | | permission | int(4) | NO | | | | And now I have to create a group table . User and group are unique , but I need a user to belong to more groups ... Which is the best way to do it ? Thx in advance David
  7. The linux kernel module fuse was doing that ... So maybe If he's using a linux box can avoid that part .
  8. Actually I did something similar in the past, but the sensor data was written on the filesystem by the sensor itself . I used a perl daemon to parse it and to send it to a mysql db . Then the data was extracted from the db via PHP and showed as a web page by an Apache web server ...
  9. Yes , I had already noticed Basically the problem is that if the dir somedir_amber_0 already exists , doesn't create somedir_amber_1 ... Here the output : Array ( [0] => 22-01-09_18-17-03 [1] => 22-01-09_18-17-03_amber [2] => 22-01-09_18-17-03_amber_0 ) SELECT workdir FROM jobs WHERE workdir LIKE '%22-01-09_18-17-03%' AND owner='27' Warning: mkdir() [function.mkdir]: File exists in /var/www/html/stable/xplor_sc.php on line 305 so I think the problem is in the if (in_array($amber_dir_new, $directories)) { $i = 0; do { $amber_dir_new = "{$amber_dir}{$amber_dir_suffix}_{$i}"; $i++; } while (in_array($amber_dir_new, $directories)); } part of the code ...
  10. MANY THX ! Still doesn't work , but at least I've understood which was my mistake !
  11. the record is a directory name , sorry
  12. This was how was working before , now all infos have been saved in a db ... while (file_exists("$home_dir/$user_dir/Xplor-SC/$amber_dir_new/") ){ $count++; $amber_dir_new=$amber_dir.$amber_dir_suffix.$underscore.$count; } I just need to do the same querying mysql ...
  13. I need to check if the record exists in the db ... ( a directory ) If it does , increment count by one . So : count = 0 1) check for "dir" -> dir exists 2) count = 1 check for dir1 -> dir1 exists 3)count=2 check for dir2 -> dir2 doesn't exist create dir dir2 ...
  14. Hi all , I'm stuck with a while that doesn't seems to work ... here the code : $amber_dir_suffix='_amber'; $amber_dir_new=$amber_dir.$amber_dir_suffix; $count=0; $underscore="-"; $query="select id from jobs where workdir='$amber_dir_new' and owner='$user_id'"; while (mysql_numrows(mysql_query($query))) { $count++; $amber_dir_new=$amber_dir.$amber_dir_suffix.$underscore.$count; } $result=mkdir("$home_dir/$user_dir/Xplor-SC/$amber_dir_new/"); if($result){ echo "Directory $amber_dir_new created succesfully "; }else{ echo "Cannot create dir $home_dir/$user_dir/Xplor-SC/$amber_dir_new!"; } Basically i need to check if the record exist , and if does increment count ... I'm sure It must be a stupid thing ...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.