Changing permissions on a file

Welcome Forums General PowerShell Q&A Changing permissions on a file

This topic contains 2 replies, has 2 voices, and was last updated by

9 months, 3 weeks ago.

  • Author
  • #101487

    Points: 1
    Rank: Member

    Hi All

    I'm in the process of writing a script that will take a .csv file, convert it into a .dat file and then upload it to a linux server. This process needs to be automated as the .dat file is used by another department. I've got the upload working but the .dat file needs to have the permission level of '666' and so far it's only '644'.

    Is this possible within PowerShell or do I need to stick with the vb script that I currently have?

    Any help would be appreciated as this is beginning to really frustrate me.


  • #101496

    Points: 631
    Helping Hand
    Rank: Major Contributor

    Files typically inherit the permissions of the directory, so wouldn't you update the permissions of the FTP directory to 666 to have any uploaded file inherit those permissions?

    • #101497

      Points: 1
      Rank: Member

      I've checked the directory permission and it's set to 777 so it appears to be not inheriting those permissions. Could it be linked to the user details I have been given by the server hosts i'm using to upload the file?

The topic ‘Changing permissions on a file’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort