summaryrefslogtreecommitdiff
path: root/src/server.cc
diff options
context:
space:
mode:
authordeva <deva>2005-05-17 19:16:26 +0000
committerdeva <deva>2005-05-17 19:16:26 +0000
commit511b49048fb62a56f7049045e0e3d85c5b3e8745 (patch)
tree989b7b2cbe69f226c3c1282f486a6aa13ce9b6a5 /src/server.cc
parentc3ac81724d3d73925a23f3ea41f14c3d557d92a5 (diff)
Made new mpeg writer work, with proper file permissions.
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);