summaryrefslogtreecommitdiff
path: root/src/server.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/server.cc')
-rw-r--r--src/server.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/server.cc b/src/server.cc
index 03f9552..135fb27 100644
--- a/src/server.cc
+++ b/src/server.cc
@@ -31,6 +31,10 @@
/*
* $Log$
+ * Revision 1.17 2005/05/17 19:16:26 deva
+ *
+ * Made new mpeg writer work, with proper file permissions.
+ *
* Revision 1.16 2005/05/17 15:12:51 deva
* Fixed file rights (All read on files and directories, and all execute on directories).
*
@@ -232,7 +236,7 @@ MovEncoderThread *newMovEncoder(char* cpr)
// Create folder named birthmonth in server root
sprintf(fname, "%s/%s", root->c_str(), birthmonth);
- if(!mkdir(fname, S_IRWXU) == -1 && errno != EEXIST) {
+ if(!mkdir(fname, S_IRWXU | S_IRGRP | S_IXGRP | S_IXOTH | S_IROTH) == -1 && errno != EEXIST) {
int r = rand();
fprintf(stderr, "Not possible to create subfolder %s\n", fname);
fprintf(stderr, "Redirecting output to [/tmp/miav-%d.mpg]\n", r);
@@ -243,7 +247,7 @@ MovEncoderThread *newMovEncoder(char* cpr)
// Create folder named cpr in serverroot/birthmonth
sprintf(fname, "%s/%s/%s", root->c_str(), birthmonth, cpr);
- if(!mkdir(fname, S_IRWXU) == -1 && errno != EEXIST) {
+ if(!mkdir(fname, S_IRWXU | S_IRGRP | S_IXGRP | S_IXOTH | S_IROTH) == -1 && errno != EEXIST) {
int r = rand();
fprintf(stderr, "Not possible to create subfolder %s\n", fname);
fprintf(stderr, "Redirecting output to [/tmp/miav-%d.mpg]\n", r);