Last change
on this file since 323 was
323,
checked in by hectorgh, 5 years ago
|
adding project files
|
-
Property svn:executable set to
*
|
File size:
687 bytes
|
Line | |
---|
1 | #!/usr/bin/env python |
---|
2 | import sys |
---|
3 | import os, os.path |
---|
4 | import pwd |
---|
5 | |
---|
6 | |
---|
7 | if len(sys.argv) != 4: |
---|
8 | sys.exit(0) |
---|
9 | home = sys.argv[1] |
---|
10 | group = sys.argv[2] |
---|
11 | user = sys.argv[3] |
---|
12 | |
---|
13 | list_files = ['.config' ,'.gconf','.gnome2','.local','.mozilla','.Xauthority','.xsession','.ICEauthority','.bashrc','.bash_logout','.dmrc','.gtk-bookmarks','.lliurex-do','.profile','.pulse','.bash_history','.cache','.gvfs','.pulse-cookie','.esd_auth','.font-config','.hydrogen','.solfegerc'] |
---|
14 | for aux_file in list_files: |
---|
15 | aux_path = os.path.join(home,aux_file) |
---|
16 | if os.path.exists(aux_path) and os.stat(aux_path).st_uid != pwd.getpwnam(user).pw_uid : |
---|
17 | cmd = "chown -R " + user +":"+group +' "' + aux_path + '"' |
---|
18 | os.system(cmd) |
---|
Note: See
TracBrowser
for help on using the repository browser.