File: readme

package info (click to toggle)
dpm-postgres 1.7.4.7-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 13,788 kB
  • ctags: 10,782
  • sloc: ansic: 146,136; sh: 13,362; perl: 11,142; python: 5,529; cpp: 5,113; sql: 1,790; makefile: 955; fortran: 113
file content (88 lines) | stat: -rwxr-xr-x 2,868 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
Execution of the C application
Author : Lana Abadie (IT-GD)
version : v1.0
Objective: 
Update the acl in a MySQL server for all the files and directories located under a given root directory

Prerequisites:
- Linux OS
- mysqlclient (version >=libmysqlclient.so.14)


Installation

- download the tar file
- create a new directory 
- unzip the tar. It is composed of of files (config_file.data and UpdateACLForMySQL)
- fill in the config_file.dat with the proper information. Each entry must be terminated by ; (a semi column) . NB sokect_path and port are optional...

- Add the location path of libmyslqclient.so to the LD_LIBRARY_PATH (if not in /usr/lib)
- chmod +x UpdateACLForMySQL
- launch the application ./UpdateACLForMySQL

How to fill the config file

There are three important entries:
-- new_directory_path : put here the root directory for which the acl should be updated (all the files and directories, including the root directory will be updated). 

-- new_gid_acl : put here the a new group or role. It will be added to the acl so that this user can access the file/directory

-- new_gid_entry : put here the new group which should own the directory. The acl will be updated consequently. Put none if you want to leave the group owner as it is.


Error
usually there is an error if:
-- the root directory does not exist
-- one of the role doesnot exist
-- the login/pwd for Mysql is wrong

Example:
if 
-- new_directory_path=/dpm/mi.infn.it/home/atlas/generated
-- new_gid_acl=atlas;
-- new_gid_entry=atlas/Role=lcgadmin;

The new ACL of the directory will be after running the script:

[root@lxb1532 output]# dpns-getacl /dpm/mi.infn.it/home/atlas/generated/ # file: /dpm/mi.infn.it/home/atlas/generated/
# owner: /C=CH/O=CERN/OU=GRID/CN=Simone Campana 7461 - ATLAS
# group: atlas/Role=lcgadmin
user::rwx
group::rwx              #effective:rwx
group:atlas:rwx         #effective:rwx
mask::rwx
other::r-x
default:user::rwx
default:group::rwx
default:group:atlas:rwx
default:mask::rwx
default:other::r-x


then if we apply the script again with the following parameters:
-- new_directory_path=/dpm/mi.infn.it/home/atlas/generated
-- new_gid_acl=atlas/Role=production;
-- new_gid_entry=none;
the ACL will be updated as follows
[root@lxb1532 output]# dpns-getacl /dpm/mi.infn.it/home/atlas/generated/
# file: /dpm/mi.infn.it/home/atlas/generated/
# owner: /C=CH/O=CERN/OU=GRID/CN=Simone Campana 7461 - ATLAS
# group: atlas/Role=lcgadmin
user::rwx
group::rwx              #effective:rwx
group:atlas/Role=production:rwx         #effective:rwx
mask::rwx
other::r-x
default:user::rwx
default:group::rwx
default:group:atlas/Role=production:rwx
default:mask::rwx
default:other::r-x


Files

The application generates a log file which gives information about the application (UpdateACLForMySQL_logfile.log).

Bugs 
Any bugs to be reported to lana.abadie@cern.ch