Example #1
0
def change_uid():
	if is_root() and not cmd_requires_root():
		frappe_user = get_config(".").get('frappe_user')
		if frappe_user:
			drop_privileges(uid_name=frappe_user, gid_name=frappe_user)
			os.environ['HOME'] = pwd.getpwnam(frappe_user).pw_dir
		else:
			print 'You should not run this command as root'
			sys.exit(1)
Example #2
0
def change_uid():
	if is_root() and not cmd_requires_root():
		frappe_user = get_config(".").get('frappe_user')
		if frappe_user:
			drop_privileges(uid_name=frappe_user, gid_name=frappe_user)
			os.environ['HOME'] = pwd.getpwnam(frappe_user).pw_dir
		else:
			print 'You should not run this command as root'
			sys.exit(1)
Example #3
0
def change_uid():
    if is_root() and not cmd_requires_root():
        frappe_user = get_config(".").get('frappe_user')
        if frappe_user:
            drop_privileges(uid_name=frappe_user, gid_name=frappe_user)
            os.environ['HOME'] = pwd.getpwnam(frappe_user).pw_dir
        else:
            log(change_uid_msg, level=3)
            sys.exit(1)
Example #4
0
def check_uid():
	if cmd_requires_root() and not is_root():
		print 'superuser privileges required for this command'
		sys.exit(1)
Example #5
0
def check_uid():
	if cmd_requires_root() and not is_root():
		log('superuser privileges required for this command', level=3)
		sys.exit(1)
Example #6
0
def check_uid():
	if cmd_requires_root() and not is_root():
		print 'superuser privileges required for this command'
		sys.exit(1)