--- a/WebappConfig/permissions.py +++ b/WebappConfig/permissions.py @@ -179,6 +179,12 @@ class PermissionMap: self.__permissions = splitted_permissions self.__absolute = False + def __str__(self): + if self.__absolute: + return 'Absolute: {}'.format(oct(self.__permissions)) + else: + return 'Relative: {}'.format(self.__permissions) + def get_group(group): ''' Specify a group id either as integer, as string that can --- a/WebappConfig/db.py +++ b/WebappConfig/db.py @@ -549,7 +549,7 @@ class WebappSource(AppHierarchy): flist = open(self.appdir() + '/' + server_owned) server_files = flist.readlines() - OUT.debug('Identified config-protected files.', 7) + OUT.debug('Identified server-owned files.', 7) flist.close() --- a/WebappConfig/filetype.py +++ b/WebappConfig/filetype.py @@ -142,13 +142,13 @@ class FileType: OUT.debug('Adding config-server-owned file', 8) - self.__cache[self.__fix(i).strip()] = 'config-server-owned' + self.__cache[self.__fix(i)] = 'config-server-owned' else: OUT.debug('Adding server-owned file', 8) - self.__cache[self.__fix(i).strip()] = 'server-owned' + self.__cache[self.__fix(i)] = 'server-owned' for i in server_owned_r: @@ -158,11 +158,12 @@ class FileType: returns one of these: - server-owned - file needs to be owned by the webserver user - (and needs to be a local copy) - config-owned - file needs to be owned by the config user - (and needs to be a local copy) - virtual - we do not need a local copy of the file + server-owned - file needs to be owned by the webserver user + (and needs to be a local copy) + config-owned - file needs to be owned by the config user + (and needs to be a local copy) + config-server-owned - Both the previous cases at the same time + virtual - we do not need a local copy of the file NOTE: Use get_dirtype(directory) for directories @@ -190,9 +191,10 @@ class FileType: returns one of these: - server-owned - dir needs to be owned by the webserver user - config-owned - dir needs to be owned by the config user - default-owned - we need a local copy, owned by root + server-owned - dir needs to be owned by the webserver user + config-owned - dir needs to be owned by the config user + config-server-owned - Both the previous cases at the same time + default-owned - we need a local copy, owned by root NOTE: Use get_filetype(filename) for files