Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
agkyra
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
itminedu
agkyra
Commits
c70f1e10
Commit
c70f1e10
authored
9 years ago
by
Giorgos Korfiatis
Browse files
Options
Downloads
Patches
Plain Diff
Make .agkyra with owner permissions only
parent
bf0b4d63
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
agkyra/config.py
+2
-1
2 additions, 1 deletion
agkyra/config.py
agkyra/syncer/setup.py
+4
-3
4 additions, 3 deletions
agkyra/syncer/setup.py
with
6 additions
and
4 deletions
agkyra/config.py
+
2
−
1
View file @
c70f1e10
...
@@ -28,6 +28,7 @@ The operations of a sync are similar to the operations of a cloud, as they are
...
@@ -28,6 +28,7 @@ The operations of a sync are similar to the operations of a cloud, as they are
implemented in kamaki.cli.config
implemented in kamaki.cli.config
"""
"""
import
os
import
os
import
stat
from
re
import
match
from
re
import
match
from
ConfigParser
import
Error
from
ConfigParser
import
Error
from
kamaki.cli
import
config
from
kamaki.cli
import
config
...
@@ -48,7 +49,7 @@ if os.path.exists(AGKYRA_DIR):
...
@@ -48,7 +49,7 @@ if os.path.exists(AGKYRA_DIR):
if
not
os
.
path
.
isdir
(
AGKYRA_DIR
):
if
not
os
.
path
.
isdir
(
AGKYRA_DIR
):
raise
Exception
(
"
Cannot create dir
'
%s
'
; file exists
"
%
AGKYRA_DIR
)
raise
Exception
(
"
Cannot create dir
'
%s
'
; file exists
"
%
AGKYRA_DIR
)
else
:
else
:
os
.
makedirs
(
AGKYRA_DIR
)
os
.
makedirs
(
AGKYRA_DIR
,
mode
=
stat
.
S_IRWXU
)
CONFIG_PATH
=
os
.
path
.
join
(
AGKYRA_DIR
,
'
config.rc
'
)
CONFIG_PATH
=
os
.
path
.
join
(
AGKYRA_DIR
,
'
config.rc
'
)
config
.
CONFIG_PATH
=
CONFIG_PATH
config
.
CONFIG_PATH
=
CONFIG_PATH
...
...
This diff is collapsed.
Click to expand it.
agkyra/syncer/setup.py
+
4
−
3
View file @
c70f1e10
...
@@ -18,6 +18,7 @@ import sys
...
@@ -18,6 +18,7 @@ import sys
import
threading
import
threading
import
logging
import
logging
import
ctypes
import
ctypes
import
stat
from
functools
import
wraps
from
functools
import
wraps
...
@@ -122,7 +123,7 @@ class SyncerSettings():
...
@@ -122,7 +123,7 @@ class SyncerSettings():
default_settings_path
=
join_path
(
home_dir
,
GLOBAL_SETTINGS_NAME
)
default_settings_path
=
join_path
(
home_dir
,
GLOBAL_SETTINGS_NAME
)
self
.
settings_path
=
utils
.
to_unicode
(
self
.
settings_path
=
utils
.
to_unicode
(
kwargs
.
get
(
"
agkyra_path
"
,
default_settings_path
))
kwargs
.
get
(
"
agkyra_path
"
,
default_settings_path
))
self
.
create_dir
(
self
.
settings_path
)
self
.
create_dir
(
self
.
settings_path
,
mode
=
stat
.
S_IRWXU
)
self
.
instances_path
=
join_path
(
self
.
settings_path
,
INSTANCES_NAME
)
self
.
instances_path
=
join_path
(
self
.
settings_path
,
INSTANCES_NAME
)
self
.
create_dir
(
self
.
instances_path
)
self
.
create_dir
(
self
.
instances_path
)
...
@@ -233,13 +234,13 @@ class SyncerSettings():
...
@@ -233,13 +234,13 @@ class SyncerSettings():
logger
.
info
(
"
Filesystem is case-%ssensitive
"
%
case
)
logger
.
info
(
"
Filesystem is case-%ssensitive
"
%
case
)
self
.
case_insensitive
=
case_insensitive
self
.
case_insensitive
=
case_insensitive
def
create_dir
(
self
,
path
):
def
create_dir
(
self
,
path
,
mode
=
0777
):
if
os
.
path
.
exists
(
path
):
if
os
.
path
.
exists
(
path
):
if
os
.
path
.
isdir
(
path
):
if
os
.
path
.
isdir
(
path
):
return
return
raise
Exception
(
"
Cannot create dir
'
%s
'
; file exists
"
%
path
)
raise
Exception
(
"
Cannot create dir
'
%s
'
; file exists
"
%
path
)
logger
.
warning
(
"
Creating dir:
'
%s
'"
%
path
)
logger
.
warning
(
"
Creating dir:
'
%s
'"
%
path
)
os
.
makedirs
(
path
)
os
.
makedirs
(
path
,
mode
=
mode
)
return
path
return
path
@ssl_fall_back
@ssl_fall_back
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment