VMware Cloud Community
Matt_B1
Enthusiast
Enthusiast

copy-datastoreitem - how can I update the file permissions?

I run a scheduled nightly script to generate a report to a CSV.  The CSV is then sent using Copy-DatastoreItem to a NFS volume on a NetApp filer mounted through vCenter.  The output files are written with only RW for the owner which is root.  Another team wants to be able to read these output files and they do not have root access.  Is there a method using my PowerCLI script to modify the file permissions?

0 Kudos
1 Reply
nalfonso14
Enthusiast
Enthusiast

One option for this may be to generate another script in linux that is generated at the end PowerCLI to change the file permissions. Programming in crond.

ex:

chown root: user_name / direcotorio_of _files / file.csv

Nicolas Alfonso Sr Virtualization Architect ***Consider awarding points for "helpful" and/or "correct" answers.***
0 Kudos