CreateDirectory on mapped drive

1C:Enterprise platform integration capabilities and techniques

#1
People who like this:0Yes/0No
Active user
Rating: 2
Joined: Sep 18, 2012
Company:

Hello everyone,
I have a problem with using global context CreateDirectory(...).
I need to create folders on mapped drive (mapped as X:)
While I am trying something like this:

Code
CreateDirectory("C:\NewFolder\") 

everything is ok. Directory is created without any problems.
But when I am trying
Code
CreateDirectory("X:\NewFolder\") 

there is a problem: "System cannot find this path" although there is a path "X:\"
Does somebody know if CreateDirectory works only for local drives or it can be used in mapped ones? I can't find the information.
Or... is it rather issue of priviliges/permissions? I don't know how to check it.
Thank you in advance for any help!
Kris

 
#2
People who like this:0Yes/0No
Interested
Rating: 16
Joined: Dec 4, 2017
Company:

Dear Kris,

When your 1C:Enterprise application's code tries to access files and folders of the file system, access to them is restricted with rights of the operating system user on behalf of whom you run the application.

If the application tries to access the file system via the piece of code running on the client side, rights of the operating system user who ran the application (thick client, thin client, or web client) are used. Typically, it is the current user of the operating system.

If the application tries to access the file system via the piece of code running on the server side:

- when using a client-server infobase, rights of the operating system user who ran the 1C:Enterprise server instance are used

Note that the server agent and working processes can be run on behalf of different users. For this purpose, use the swpuser.ini auxiliary file.

- when using a file infobase published via a web server, rights of the operating system user who ran the web server are used

Best regards,
Vladimir Gurov

1C Company support team
 
Subscribe
Users browsing this topic (guests: 2, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.