"Fossies" - the Fresh Open Source Software Archive

Member "irods-4.2.8/scripts/chown_directories_for_postinstall.py" (14 May 2020, 326 Bytes) of package /linux/misc/irods-4.2.8.tar.gz:

As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Python source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. For more information about "chown_directories_for_postinstall.py" see the Fossies "Dox" file reference documentation.

    1 import os
    2 import pwd
    3 import grp
    4 from irods import paths
    6 if os.path.exists(paths.service_account_file_path()):
    7     service_account_uid = paths.irods_uid()
    8     service_account_gid = paths.irods_gid()
    9     for dirpath, _, _ in os.walk(paths.irods_directory()):
   10         os.chown(dirpath, service_account_uid, service_account_gid)