Linux drives me crazy... Rights, listdir...

D

durumdara

Dear Everybody!

We have a redmine server with linux.
I wrote some pythonic tool that backup the redmine (files and
database) and put to ftp server.

This was working fine.

But today I checked, and I saw this failed in the prior week.
As I checked more, I saw that part. is out of space.
I stored the files, logs, dumps in the /home, and this dev. is out of
space.

Then I tried to move to /var/www/redmine_backup folder.

And then I got result what I don't understand.

In root mode I set the user on every file and directory, and set the
mode to 777, and set sticky bit, and user/group on execution.
Everything is same, but when I check os.listdir() on this dir, I see
only two folders.

5 elements are here:
Files_Zipped (dir)
MySQL_Dump (dir)
Log (dir)
Log2 (dir)
BackupRedmine.py (the script)

The listdir show only:
Files_Zipped
MySQL_Dump

(It don't see itself!)

Because it don't see the Log dir, try to make it, and it have been
failed...

I checked all things in MC too, but I cannot find the differents...
May this is Python bug?

xuser@h2182:~$ /var/www/backup_redmine/BackupRedMine.py /log
RedMine Backup V1.0
Log mode
Make and get backup path
Try to make /var/www/redmine_backup/Log
Traceback (most recent call last):
File "/var/www/backup_redmine/BackupRedMine.py", line 239, in <module>
logfilename = MakeBackupPath(_SubPath_Log) + '/log_' + NowStr
File "/var/www/backup_redmine/BackupRedMine.py", line 78, in
MakeBackupPath
os.makedirs(path)
File "/usr/lib/python2.5/os.py", line 171, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/var/www/redmine_backup/Log'

xuser@h2182:/var/www/backup_redmine$ ./BackupRedMine.py /log
RedMine Backup V1.0
Log mode
Make and get backup path (os.listdir)
['Files_Zipped', 'MySQL_Dump']
xuser@h2182:/var/www/backup_redmine$ ls -l
total 24
-rwxrwxrwt 1 xuser xuser 7350 2011-03-29 10:47 BackupRedMine.py
drwsrwsrwt 2 xuser xuser 4096 2011-03-29 09:46 Files_Zipped
drwsrwsrwt 2 xuser xuser 4096 2011-03-29 10:36 Log
drwsrwsrwt 2 xuser xuser 4096 2011-03-29 10:42 Log2
drwsrwsrwt 2 xuser xuser 4096 2011-03-29 09:46 MySQL_Dump

But interesting thing is that everything is working good on /home.

So it is seems to be right problem, but what is the different?

What can I do?

Thanks:
dd
 
D

durumdara

Hi!

Sorry. The path was wrong! "backup_redmine <> redmine_backup"... :-(

Thanks:
dd
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,783
Latest member
RickeyDort

Latest Threads

Top