Answers.Body: <p>I understand now within the context of you are using docker. Since docker creates a new file system separate from your computer's file system, you will want to run these commands on the docker instance. </p>
  
  <p>I do not use docker regularly, but I believe you can use <code>docker attach</code> while the droplet is running to access the droplet's file system.</p>
  
  <p>You will want to set the parent folder to have higher privileges. Try this command: </p>
  
  <pre><code>chmod 774 craftcms-assets
  </code></pre>
  
  <p>Privileges are composed of three numbers: self, group, and world. There are also three access levels: read, write, and execute. 7 will give access to read, write, and execute. You will want to use 7 for your own commands (self) and for craft's commands (group), but not for the general public (world).</p>
  
  <p>Hope this helps!</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-27T21:48:33.933Z
Answers.Text: Ok I tried that, and I'm still getting the error.
Answers.UserDisplayName: BBaysinger
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-27T22:02:37.803Z
Answers.Text: it's the same error? can you make sure that the web and repo folders have 774 also
Answers.UserDisplayName: Clark Nelson
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-27T22:04:00.713Z
Answers.Text: Hm. Yup, same error. Changed both of those, and it's still not working.
Answers.UserDisplayName: BBaysinger
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-27T22:07:51.870Z
Answers.Text: Realized Docker Compose could have something to do with it. Updated my question.
Answers.UserDisplayName: BBaysinger
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-28T14:05:52.983Z
Answers.Text: @BBaysinger I've updated my answer with docker information!
Answers.UserDisplayName: Clark Nelson
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-27T21:45:33.767Z
Answers.LastActivityDate: 2019-08-28T14:05:17.437Z
Answers.LastEditDate: 2019-08-28T14:05:17.437Z
Answers.UserDisplayName: Clark Nelson
Answers.Body: <p>Since this is the top result on Google for this error, I wanted to add that what fixed it for me (a non-docker user) was <strong>setting the permissions for the &quot;/assets/images&quot; directory to 775</strong>.</p>
  <p>Craft's documentation says to set certain folders to 774, but evidently it needs that Public Execution permission for the system to recognize it.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-23T14:13:29.403Z
Answers.LastActivityDate: 2021-03-23T14:13:29.403Z
Answers.UserDisplayName: FirstAidChris
Body: <p>In Craft 3.2.10, I'm getting this error message when I try to upload an image asset:</p>
  
  <blockquote>
    <p>Upload failed. The error message was: “Impossible to create the root
    directory "/Users/me/Work/Client/repo/web/craftcms-assets/project-slide-photos". mkdir():
    Permission denied”</p>
  </blockquote>
  
  <p>I've made the permissions for <code>project-slide-photos</code> to 777 and 774, and likewise tried both for the parent directory. Is it trying to create a directory that's already there? I tried removing <code>project-slide-photos</code> also, and it still doesn't work.</p>
  
  <p>What do I need to do to make my assets upload into this directory?</p>
  
  <p>Edit: Wondering if using Docker Compose could have something to do with this:</p>
  
  <p><code>docker-compose.yml</code>:</p>
  
  <pre><code>version: '3'
  services:
      web:
          image: 'flipbox/php:72-apache'
          ports:
              - '80:80'
              - '443:443'
  
          volumes:
              - '.:/var/www/html/'
          environment:
              ENVIRONMENT: dev
              DB_SERVER: db
              DB_USER: craft
              DB_PASSWORD: craft
              DB_DATABASE: craft
              XDEBUG_ON: "yes"
              XDEBUG_HOST: "host.docker.internal"
              XDEBUG_IDEKEY: "PHPSTORM"
              APACHE_DOCUMENT_ROOT: "/var/www/html/web"
      db:
          image: 'mysql:5.7'
          restart: always
          ports:
              - '3306:3306'
  
          volumes:
              # Location to import a database dump. 
              - ./src:/docker-entrypoint-initdb.d
              # Location of the generated mysql files.
              - ./mysql:/var/lib/mysql
  
          environment:
              MYSQL_ROOT_PASSWORD: password
              MYSQL_DATABASE: craft
              MYSQL_USER: craft
              MYSQL_PASSWORD: craft
  </code></pre>
  
Tags: <assets><upload><volumes>
Title: Error on upload: "Impossible to create the root directory..."
ThreadText: # Error on upload: "Impossible to create the root directory..."
  
  (Asked by: username_0 on 2019-08-27)
  
  In Craft 3.2.10, I'm getting this error message when I try to upload an image asset:
  
  > Upload failed. The error message was: “Impossible to create the root
  > directory "/Users/me/Work/Client/repo/web/craftcms-assets/project-slide-photos". mkdir():
  > Permission denied”
  
  I've made the permissions for `project-slide-photos` to 777 and 774, and likewise tried both for the parent directory. Is it trying to create a directory that's already there? I tried removing `project-slide-photos` also, and it still doesn't work.
  
  What do I need to do to make my assets upload into this directory?
  
  Edit: Wondering if using Docker Compose could have something to do with this:
  
  `docker-compose.yml`:
  
  ```
  version: '3'
  services:
      web:
          image: 'flipbox/php:72-apache'
          ports:
              - '80:80'
              - '443:443'
  
          volumes:
              - '.:/var/www/html/'
          environment:
              ENVIRONMENT: dev
              DB_SERVER: db
              DB_USER: craft
              DB_PASSWORD: craft
              DB_DATABASE: craft
              XDEBUG_ON: "yes"
              XDEBUG_HOST: "host.docker.internal"
              XDEBUG_IDEKEY: "PHPSTORM"
              APACHE_DOCUMENT_ROOT: "/var/www/html/web"
      db:
          image: 'mysql:5.7'
          restart: always
          ports:
              - '3306:3306'
  
          volumes:
              # Location to import a database dump. 
              - ./src:/docker-entrypoint-initdb.d
              # Location of the generated mysql files.
              - ./mysql:/var/lib/mysql
  
          environment:
              MYSQL_ROOT_PASSWORD: password
              MYSQL_DATABASE: craft
              MYSQL_USER: craft
              MYSQL_PASSWORD: craft
  
  ```
  
  **Tags:** assets, upload, volumes
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2019-08-27. Score: 4 | Accepted answer
  
  I understand now within the context of you are using docker. Since docker creates a new file system separate from your computer's file system, you will want to run these commands on the docker instance.
  
  I do not use docker regularly, but I believe you can use `docker attach` while the droplet is running to access the droplet's file system.
  
  You will want to set the parent folder to have higher privileges. Try this command:
  
  ```
  chmod 774 craftcms-assets
  
  ```
  
  Privileges are composed of three numbers: self, group, and world. There are also three access levels: read, write, and execute. 7 will give access to read, write, and execute. You will want to use 7 for your own commands (self) and for craft's commands (group), but not for the general public (world).
  
  Hope this helps!
  
  > **Comments:**
  > **username_0**: Ok I tried that, and I'm still getting the error.  
  > **username_1**: it's the same error? can you make sure that the web and repo folders have 774 also  
  > **username_0**: Hm. Yup, same error. Changed both of those, and it's still not working.  
  > **username_0**: Realized Docker Compose could have something to do with it. Updated my question.  
  > **username_1**: @username_0 I've updated my answer with docker information!  
  
  ---
  
  ### Answer by username_2 on 2021-03-23. Score: 2
  
  Since this is the top result on Google for this error, I wanted to add that what fixed it for me (a non-docker user) was **setting the permissions for the "/assets/images" directory to 775**.
  
  Craft's documentation says to set certain folders to 774, but evidently it needs that Public Execution permission for the system to recognize it.
  
  
  ---
  
  