Wednesday, May 27, 2015

Re: ./manage.py collectstatic permission denied

Oh yeah, see Tim's answer to your duplicate post.

-James

On May 27, 2015 6:05 PM, "James Schneider" <jrschneider83@gmail.com> wrote:

Do you have a /static directory on your server? Does your user have write privileges to it? I suspect you are trying to copy to a local directory in your project named static, and not one located at the root of your file system, so you probably need to change where your static files point.

-James

On May 27, 2015 11:32 AM, "sudhin babu" <sudhinthedeveloper@gmail.com> wrote:
How can we solve this problem? copying admin static files to STATIC_ROOT may solve this .But how 

(hackernews)junkuos@ hackernews$ ./manage.py collectstatic

You have requested to collect static files at the destination
location as specified in your settings:

    /static

This will overwrite existing files!
Are you sure you want to do this?

Type 'yes' to continue, or 'no' to cancel: yes
Copying '/home/sudhin/django/hackernews/static/css/main.css'
Traceback (most recent call last):
  File "./manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/home/sudhin/.virtualenvs/hackernews/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
    utility.execute()
  File "/home/sudhin/.virtualenvs/hackernews/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 330, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/sudhin/.virtualenvs/hackernews/local/lib/python2.7/site-packages/django/core/management/base.py", line 390, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/sudhin/.virtualenvs/hackernews/local/lib/python2.7/site-packages/django/core/management/base.py", line 441, in execute
    output = self.handle(*args, **options)
  File "/home/sudhin/.virtualenvs/hackernews/local/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 168, in handle
    collected = self.collect()
  File "/home/sudhin/.virtualenvs/hackernews/local/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 107, in collect
    handler(path, prefixed_path, storage)
  File "/home/sudhin/.virtualenvs/hackernews/local/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 315, in copy_file
    self.storage.save(prefixed_path, source_file)
  File "/home/sudhin/.virtualenvs/hackernews/local/lib/python2.7/site-packages/django/core/files/storage.py", line 64, in save
    name = self._save(name, content)
  File "/home/sudhin/.virtualenvs/hackernews/local/lib/python2.7/site-packages/django/core/files/storage.py", line 223, in _save
    os.makedirs(directory)
  File "/home/sudhin/.virtualenvs/hackernews/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/home/sudhin/.virtualenvs/hackernews/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/static'

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ea99472b-0455-44de-9305-7e1011118c3e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2Be%2BciVuvbDVcqGdkVo3A7L1aoBuarXFswOe1xQ8dz54bbozHw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment