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

 
Participant
6 months, 2 weeks ago.

  • Author
    Posts
  • #101487

    Participant
    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.

    Thanks

  • #101496

    Participant
    Points: 324
    Helping Hand
    Rank: 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

      Participant
      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.