0

How can we swtich group for different project in Linux.

In linux for each of the project the mount is assigned to a group and only members of that group can access it. What is the best way for every new project we can access the mount with a newgrp "groupName", either this can set as a global variable like currentShow and the value can be used to switch group and execute the tank scripts. Currently shotgun fails when we run create folders. The server we are using is https://grid-animation.shotgunstudio.com/.

Thanks

Pallav

 

 

Error :- (Permission denied as its not is correct group)

ERROR: Error when creating folders!

[Errno 13] Permission denied: '/srv/projects/ziggy/library'
The current environment is shotgun_task.

Code Traceback:
File "/srv/pipeline/grid/thirdParty/tank/ziggy/studio/install/apps/app_store/tk-shotgun-folders/v0.1.5/app.py", line 87, in create_folders
entities_processed = self.tank.create_filesystem_structure(entity_type, entity_ids)
File "/srv/pipeline/grid/thirdParty/tank/ziggy/studio/install/core/python/tank/api.py", line 483, in create_filesystem_structure
engine)
File "/srv/pipeline/grid/thirdParty/tank/ziggy/studio/install/core/python/tank/folder/operations.py", line 203, in process_filesystem_structure
folders_created = io_receiver.execute_folder_creation()
File "/srv/pipeline/grid/thirdParty/tank/ziggy/studio/install/core/python/tank/folder/folder_io.py", line 73, in execute_folder_creation
preview_mode=self._preview_mode)
File "/srv/pipeline/grid/thirdParty/tank/ziggy/studio/install/core/python/tank/api.py", line 519, in execute_hook
return self.pipeline_configuration.execute_hook(hook_name, parent=self, **kwargs)
File "/srv/pipeline/grid/thirdParty/tank/ziggy/studio/install/core/python/tank/pipelineconfig.py", line 549, in execute_hook
return hook.execute_hook(hook_path, parent, **kwargs)
File "/srv/pipeline/grid/thirdParty/tank/ziggy/studio/install/core/python/tank/hook.py", line 120, in execute_hook
return execute_hook_method([hook_path], parent, None, **kwargs)
File "/srv/pipeline/grid/thirdParty/tank/ziggy/studio/install/core/python/tank/hook.py", line 187, in execute_hook_method
ret_val = hook_method(**kwargs)
File "/srv/pipeline/grid/thirdParty/tank/ziggy/studio/install/core/hooks/process_folder_creation.py", line 102, in execute
os.makedirs(path, 0777)
File "/usr/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)

1 comment

  • 0
    Avatar
    KP

    Hi Pallav,

    We get questions like this a lot. Permission issues like this can be tricky for system admins and engineers to resolve but Toolkit allows for some good flexibility here. I'd recommend you take a look at the docs we have about Customizing I/O and Permissions in the Filesystem Configuration Reference. This page walks through how to use the folder creation hook to customize how your folders are created and how to manage permissions on them. 

    Admittedly, this can get a bit technical. If you need some help with how to use hooks, we have documentation about them as well: Hooks (Administering & Configuring SGTK).

    Let me know how it goes and if you have any questions.

Please sign in to leave a comment.