{"id":17039044,"url":"https://github.com/dcnick3/aurora-test","last_synced_at":"2025-03-22T23:45:00.668Z","repository":{"id":107291753,"uuid":"477841992","full_name":"DCNick3/aurora-test","owner":"DCNick3","description":null,"archived":false,"fork":false,"pushed_at":"2022-04-05T07:17:03.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-28T03:29:54.232Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DCNick3.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-04T19:20:40.000Z","updated_at":"2022-04-05T07:07:24.000Z","dependencies_parsed_at":"2024-05-28T11:07:19.744Z","dependency_job_id":null,"html_url":"https://github.com/DCNick3/aurora-test","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCNick3%2Faurora-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCNick3%2Faurora-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCNick3%2Faurora-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DCNick3%2Faurora-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DCNick3","download_url":"https://codeload.github.com/DCNick3/aurora-test/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245036122,"owners_count":20550661,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T08:58:29.687Z","updated_at":"2025-03-22T23:45:00.631Z","avatar_url":"https://github.com/DCNick3.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"## overview\n\nI decided to use C++ with CMake build system for the task\n\nFirst of all, I've written C++ wrappers for Linux C functions I needed to get uid \u0026 gid by usernames along with file permissions.\n\nIn there I used [TartanLlama/expected](https://github.com/TartanLlama/expected) library which is an implementation of https://wg21.link/P0323R11 proposal to handle errors nicely.\n\nThis piece of code is located in `unix.cpp` file\n\nThe algorithm itself is located in `main.cpp` file. It uses `std::filesystem::recursive_directory_iterator` to traverse the directory tree and functions from `unix.cpp` to get the info necessary for deciding whether the user can write the file or not.\n\nFinally, I use [CLIUtils/CLI11](https://github.com/CLIUtils/CLI11) to parse the command line arguments and provide a nice help message\n\n## how to build \u0026 run\n\nBuild should as easy as this one-liner:\n\n```\nrm -rf cmake-build-debug/ \u0026\u0026 mkdir -p cmake-build-debug/ \u0026\u0026 cd cmake-build-debug/ \u0026\u0026 cmake .. \u0026\u0026 cmake --build .; cd ..\n```\n\nCmake will download the required libraries and build the program\n\nAfter this it can be ran as\n\n```\nsudo ./cmake-build-debug/mycheckperm -u username -g groupname -p /home/myname/testdir/\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcnick3%2Faurora-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdcnick3%2Faurora-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcnick3%2Faurora-test/lists"}