STATIC_ROOT should be the absolute path to the directory static files should be collected to. Example: "/var/www/example.com/static/"
It looks like you set it to "/static" which probably doesn't exist (or at least your user doesn't have write privileges to it). On Wednesday, May 27, 2015 at 2:28:12 PM UTC-4, sudhin babu wrote: > > i am using ubntu14.04 copying admin static files to STATC_ROOT may solve > this problem but how can i run this command successfully? > > (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 [email protected]. To post to this group, send email to [email protected]. 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/7bd7d405-8911-44ac-a780-a0d206ddff7d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

