arcpy file permission shutil copy

951
5
04-23-2021 07:51 AM
NatashaManzuiga
Occasional Contributor

Hi all, I created a geoprocessing task and it perfectly works.
At the end I see that I have the same problem of this thread with arcgis server with linux:
https://community.esri.com/t5/python-questions/arcgis-server-on-linux-python-unable-to-change-file-p...
Does someone have the solution? Or I cant do anything to change the files permission from arcgis python?

Thanks,

Naty

0 Kudos
5 Replies
JoeBorgione
MVP Emeritus

What version of python are you using?

That should just about do it....
0 Kudos
NatashaManzuiga
Occasional Contributor

I'm using ArcGIS Enterprise 10.8 so I think:

  • Python 2.7.16, NumPy 1.9.3, and matplotlib 1.5.2
  • Python 3.6.9, NumPy 1.16.5, and matplotlib 3.1.1

Naty

0 Kudos
DanPatterson
MVP Esteemed Contributor

both python versions have the "os" module, just check their version of "os" for exact syntax


... sort of retired...
0 Kudos
DanPatterson
MVP Esteemed Contributor
0 Kudos
MarkKinnaman
New Contributor III

There are several ways to call chmod via python. You can use os.chmod() from os and you can use Path.chmod() from pathlib depending on personally preference. Also, if you only need to set the user permissions os and shutil have chown() functions.

OS Python Docs

Python Pathlib Docs

Shutil Docs

0 Kudos